Most NATO (the North Atlantic Treaty Organization) members saw little real purpose for the organization after 1991. Still, NATO remained active and NATO forces were used in the 1990s for peacekeeping in the Balkans, where Yugoslavia violently came apart, and later in Iraq, Afghanistan and Libya. These peacekeeping efforts revealed more weaknesses and disorganization in NATO than proof that the organization could be more than a defense against a major threat.
When the major threat manifested itself in 2022, as Russia invaded Ukraine with the goal of absorbing back into a Russian empire, NATO did quickly return to its original unity of purpose. The change was surprisingly rapid and rather thorough. After decades of decline and failure to find a new purpose, NATO again became a valued mutual-defense organization.
NATO members sending peacekeeping forces to the Balkans, Iraq and Afghanistan encountered some serious leadership and morale problems. The generals, and the troops who served in these combat zones, were unhappy with how their politicians back home endangered the lives of troops by putting restrictions on what the NATO soldiers could do, even when it was a matter of life-and-death to the men involved. The generals were angry at politicians who ordered troops into a combat zone without bothering to learn what exactly was going on there and ignored generals and staff officers who tried to explain the situation. This got pretty ugly and the disputes did not go away.
Sometimes the argument went public. In 2011, a retiring U.S. Secretary of Defense openly questioned the ability of NATO to survive after its very mixed performance in Afghanistan and general unwillingness of members to pull their weight. It was pointed out that the U.S. supplied 75 percent of the budget for NATO and was constantly called on to do most of the fighting and provide essential transportation and support functions. In effect, too many NATO nations were joining to obtain protection and special services provided by the American military, without making a contribution in proportion to the size of each member's economy and population.
NATO was originally created to protect Western Europe from the very real threat of Soviet invasion. But that threat disappeared when the Soviet Union dissolved in 1991. After that NATO was repurposed to help protect member nations from more distant threats, notably Islamic terrorism and unrest in nations that supply NATO states with oil or other raw materials. That did not work because each member nation could choose the degree to which it would participate.
American leaders were not the only ones unhappy with these disparities. In 2006 NATO commanders in Afghanistan were openly complaining about all the strings attached to their authority by politicians back home. At that time, the ROE (Rules of Engagement) for NATO troops contained over seventy restrictions on how NATO commanders could use troops assigned to them. Most of these restrictions were about where national contingents could be moved and how much danger they could be exposed to. The NATO troops were good at what they were trained for but they were not allowed to do much and that often put the soldiers and local civilians in danger. Troop commanders insisted they could do more, and at less risk to themselves, if the NATO commanders had fewer strings attached to who can be used where and how. That would seem impossible, given that three dozen NATO nations had troops in Afghanistan. But it's only the major contributors of combat forces that NATO commanders are really worried about. By going public with complaints about the ROE problem the NATO commanders were setting up the politicians back home to take the heat for any casualties in Afghanistan. It also put pressure on the politicians to ease up on the ROEs, which were created mainly to win political points back home.
The complaints in 2006 led to some restrictions being lifted but most restrictions remained. This produced some ludicrous situations. For example, in 2010 European NATO commanders recommended that NATO establish a combat award recognizing soldiers who risk their own lives to avoid Afghan civilian casualties. This would be called the Courageous Restraint medal and the first few would probably be awarded posthumously because the most obvious cases would involve NATO troops holding their fire when the enemy used civilians as human shields. This enables the enemy to kill their better trained and equipped opponents. The best example of this occurred in 1993 when 24 Pakistani peacekeepers were killed by Somali gunmen using civilians as human shields. Those dead Pakistanis would be eligible for the Courageous Restraint medal. The only problem with this is that the troops are none too happy with this use of human shields or the risks of getting killed because of it. American troops were allowed to do whatever it took, if American lives were endangered. Other NATO troops had similar escape clauses in their ROEs, but often not as robust as the American one.
What commanders were trying to do was inspire the troops to sacrifice their lives in order to avoid civilian casualties. But the troops could do the math and realized that the bulk of civilian deaths were at the hands of the Taliban or other Islamic terrorists. That, however, was not news inside or outside Afghanistan. Any Afghan civilian dying at the hands of foreign troops is news. Most troops are not willing to die to help their boss avoid some unfavorable press.
Meanwhile, the traditional military awards for battlefield valor were still being earned for the usual reasons, to help one's fellow soldiers in a dangerous situation. This sometimes involves saving the lives of civilians, who are also being threatened by Taliban violence. The NATO commanders were proposing the Courageous Restraint award for actions that go far beyond this into territory troops are reluctant to travel. Since troops who win medals for valor never think about winning a medal when they do what it takes to earn one, it's difficult to understand how a Courageous Restraint award will be anything but a propaganda ploy inflicted on the families of soldiers who died because of restrictive ROE that allow the enemy to take shelter behind human shields and continue to shoot at NATO troops. The courageous restraint medal idea did not last long but the fact that it was even proposed put the spotlight on what a burden politically inspired ROE had become for the troops.
NATO member nations are still called on to do peacekeeping, but as participants in UN peacekeeping efforts and usually just to supply technical services, like air transport and specialized support that other peacekeeper contributors cannot provide. In many parts of the world, especially Africa, the peacekeeping troops come from local nations. These countries have an interest in maintaining peace in areas close to them.
The situation in Ukraine does not require, or even allow, a lot of NATO troops. There are a lot of NATO troops in Ukraine, but most are volunteers who are veterans, many with combat experience. There are some active-duty NATO troops in Ukraine, but these are either part of embassy military attaché staff or part of training missions that have long been present in Ukraine. Many NATO nations have rules or laws preventing their citizens from taking part in foreign wars. These do not apply in Ukraine, which is fighting to survive and finally join NATO or establish a long-term relationship with NATO, as the Israelis have done. Foreign troops in Ukraine are often from NATO countries and are often specialists, like snipers, EOD (Explosive Ordnance Disposal) or combat medics which Ukrainian forces always need more of. Most others are there to train Ukrainians, especially civilian volunteers, in the use of NATO portable anti-vehicle and anti-aircraft weapons as well as the basics of handling infantry weapons and surviving in combat. In some cases, there are so many volunteers from one country that national battalions are organized to fight along with Ukrainian army units.
More NATO troops may end up in Ukraine, if they are not already there, to provide support functions. Russia has threatened nuclear escalation if NATO forces intervened but that line has already been crossed in order to provide the flood of modern weapons that has armed the Ukrainian soldiers and civilians. NATO member countries are doing this as individual nations coming to the aid of a friendly local nation under attack by a mutual enemy. The Russian excuse is that the dissolution of the Soviet Union in 1991 was an error and Russia now considered Ukraine and other former parts of the USSR as Russian territory that Russia will reclaim by force if necessary. The Russians are still attacking Ukraine but with different tactics. Now Russia is using a combination of terror (against civilians), subversion and, if necessary, devastation to win the kind of victory the ancient Romans described as “creating a desert and calling it peace.”