The closest answer is Liechtenstein, and the story of how a country that tiny survived every European war for 300 years is one of the more entertaining accidents in political history.
Switzerland gets cited constantly due to their very strong reputation of being neutral, but Switzerland has a deeply martial past. Before the 19th century, Swiss mercenaries were the most feared soldiers in Europe and the country was effectively in the business of renting them out to anyone who could pay.
San Marino is the other common answer, and San Marino is itself very interesting, founded in 301 AD as a mountaintop refuge by a stonemason fleeing Roman persecution, surviving Napoleon, surviving the unification of Italy, surviving everything. Except in 1944 it briefly got entangled in the war as the same mountains which made whomever occupied Italy opt to ignore it made it appealing to the German military to occupy and use as a defensive bulwark.
Liechtenstein was founded in 1719 for reasons that had nothing to do with the people living there or any romantic notion of independence. The House of Liechtenstein was one of the wealthiest noble families in Vienna. They owned vast estates across Austria and Bohemia and were significant creditors to the Holy Roman Emperor himself. The problem was that none of their land carried what was called Imperial Immediacy, meaning land that answered directly to the Emperor rather than to some intermediate duke or bishop. Without it you couldn't sit in the Imperial Diet, which was the parliament where real decisions got made.
So they sought out a loophole and found two small, impoverished, economically worthless territories on the Rhine whose previous rulers had gone bankrupt, bought them. They then petitioned the Emperor to unify them into a single principality named after the family. The Emperor agreed and the Liechtenstein family now had their seat in parliament.
Depsite the prestige it gave them, they still had no interest in the actual place. No Prince of Liechtenstein set foot in the country for the first 120 years of its existence. Because the territory was mountainous, landlocked, wedged in between Switzerland and Austria, and produced nothing anyone wanted, the great powers of Europe ignored it completely during the wars that followed. When the Holy Roman Empire collapsed under Napoleon, Liechtenstein was small enough and irrelevant enough that it simply continued existing while all the other state around it dissolved.
The country's one and only military deployment came in 1866 during the Austro-Prussian War. Liechtenstein sent 80 soldiers to guard a mountain pass on the Italian border on behalf of their Austrian allies. They saw no combat. The pass was never threatened. When the war ended, the soldiers walked home, and they returned with 81 men because they had befriended an Austrian officer during the campaign and brought him back with them.
The government looked at this expedition and decided the army was an unnecessary expense. In 1868 Liechtenstein dissolved its military entirely. It has had no army since.
This turned out to be the right call, because the country that became their protector by default was Switzerland. In 1923, after World War I had economically devastated Liechtenstein through its ties to the collapsing Austro-Hungarian Empire, they signed a customs and monetary union with Switzerland, adopting the Swiss franc and outsourcing their borders and foreign policy to a much larger neutral neighbor.
When Germany annexed of Austria it put Liechtenstein right on their immediate border. Liechtenstein's own Nazi sympathizers tried to capitalize on this and staged a coup attempt in 1939 trying to hand the country over. It failed. But Germany decided against taking matters into their own hands. Liechtenstein was 160 square kilometers of mountains with no resources, no military value, and no railway lines worth having. Absorbing it would have created more paperwork than it was worth.
These days Liechtenstein is one of the wealthiest countries per capita in the world, a global financial center and tax haven. It’s so important economically now that the Liechtenstein family actually lives there for once.