Note: this is based in part on my master’s thesis written 3 decades ago, going off of memory.
In a bipolar world such as the Cold War, small countries have two options:
Pick a side
Try to be neutral
During the Cold War, Finland and Austria were official neutral.
Finland had the precarious position of having a long border with the Soviet Union. It also has been a previous possession of Russia and fought a war with Russia. Finland was at severe risk, so strict neutrality was great, so long as the powers trusted Finland to remain neutral.
Likewise Austria was on the borders between NATO and the Warsaw Pact. To get Soviet troops out of Austria after WW2, it promised neutrality.
A great many other nations attempted to be “neutral” and became part of the Non Aligned Nations or the original “Third World”. India is the great example of this.
Other countries sat some place in between. In the Americas, the US has used the Monroe Doctrine and the Organization of American States to create an informal empire and pushed European nations out, as much as possible. Democracy was not an issue. Cooperating with the US and opening up markets were key issues.
The rest of the world was largely divided into these blocs. But let's look at an earlier era to see how a small country can withstand even great power pressure.
Portugal had set off exploring the Far East and establishing an Asian empire largely consisting of trading posts from the Middle East to Japan. It had also begun developing Brazil.
However after the death of a king, Spain under Phillip II united Spain and Portugal into a personal union in 1580, enforced with an army in 1581. This meant the vast Spanish empire was open for trade for Portugal. But it also meant that Spain's enemies were Portugal's.
More significantly Spain was a Hapsburg country and all the conflicts of the Hapsburgs became Portugal's as well. Emperor Charles V had ruled over a vast empire.
The Hapsburgs ruled Spain, Sardinia, Naples, Sicily, Milan, Austria, Bohemia, Slovenia, Hungary, Belgium, the Netherlands, and various other territories, as well as being the Holy Roman Emperor. France was usually the chief Hapsburg enemy. The reformation also split Europe on religious lines and the Hapsburgs were in the forefront of supporting the Catholic church.
The Dutch had fallen into Hapsburgs control through marriage and death. The Duchy of Lorraine (which had been a kingdom as well) generally was in the region between France and Germany and ebbed and flowed over time and ruled the Low Countries.
In the division of the Hapsburg lands after Emperor Charles V, Spain received Spain, Sardinia, Naples, Sicily, Flanders (basically Belgium), the Netherlands, Milan, and some territories in France.
Here is Philip II's domain in Europe:
The Dutch revolted and fought a war a 80 years war against Spain for independence. The Portuguese had previously maintained good relationships with the Dutch and sold much of their spices from the Far East in the Netherlands.
Now the Dutch used the union of Portugal and Spain to justify attacking Portuguese trade and colonies. They invaded Brazil, attacked ships at sea, and conquered colonies in the East. The Dutch trading empire was based upon this war.
Philip II respected the Portuguese, as did his son, but his grandson Philip IV did not, and started treating Portugal like a colony. This lead to a revolt in 1640 by Portugal against Spain. This war continued until 1668 when Spain finally recognized Portuguese independence.
In 1640 Spain was consumed with fighting the 30 Years War and especially fighting against Dutch independence. The Dutch didn't let up on Portugal and continued to attempt to steal the Portuguese empire.
Portugal had been pretty wealthy but small (outside of its overseas empire) at the time of the union with Spain. In 1640 Portugal was much weaker. As such, it needed allies, some powerful nation to protect its independence.
My research years ago uncovered a journal from a Jesuit Portuguese diplomat and he detailed his efforts to secure powerful support. The Portuguese in the journal was a bit archaic but close enough that I could struggle through it.
The Jesuit detailed his efforts to secure support from a powerful country. His first mission was to France, were Cardinal Richelieu led the government. The Cardinal gave token support, but refused to commit to securing Portuguese independence. France really didn't have the resources. It was fighting Spain and the Hapsburgs on multiple fronts. So Richelieu gave only minimal support.
The war between the Dutch and the Portuguese concluded after the Dutch were kicked out of Brazil in 1654. A treaty was signed in 1661. Trade resumed for the first time since 1580. But likewise the Dutch didn't have the ability to truly support Portugal and refused to guarantee Portuguese independence from Spain.
Spain and France finally wrapped up their conflict in 1659. France recognized Spain as true and rightful rulers of Portugal. Cardinal Mazarin sold out the Portuguese. Spain, having resolved other conflicts, at least for the moment, turned to attack Portugal in force.
At this point, with nowhere else to go, Portugal approach England for an alliance. The English were not as big and powerful as France. England had gone through civil war and the Commonwealth. In 1660 the Restoration brought back the monarchy. Portugal had sheltered nobles during the Commonwealth.
England was willing to help Portugal…. for a price. Portugal was required to open up its markets to England. A series of treaties over the next hundred years gave England greater access to Portugal. The Portuguese intentionally sold their economic independence to England for political independence.
As a side note, Ricardo's famous competitive advantage theory is based upon English Portuguese trade. He failed to mention the geopolitical aspects and the treaties involved that gave England an unfair advantage. Portugal had a robust cloth industry before it sold out to England. It could produce cloth at a lower price point than England. This industry ended up largely destroyed due to political choices made by Portugal. There was no comparative advantage at play.
So what does that mean for us today?
Smaller weaker countries are at a disadvantage.
However, they can maneuver around the geopolitical landscape and seek out various powers for support.
The price to pay may be steep.
A country can just submit instead.
The Anglo-Portuguese alliance was crucial for Portugal. It was due to this alliance that Napoleon never conquered Portugal. In fact, the 1580 union was the very last time Portugal was conquered by outside forces. Portugal has now been free from Spain for 360 years. For a small country with a bigger, more powerful neighbor, that is remarkable. Maybe it is a pretty good example of how diplomacy works for smaller nations.