In the real world, Russia never stopped the first invasion, it just consolidated, worked to advance, and then massively escalated.
Which is just a pretense. On different days, the "special military operation" has been to avoid NATO bordering Russia (which it already does in the Baltic), "remove Nazis", "fix Lenin's mistake of separating Ukraine from Russia", "free Donbass and Luhansk" and probably others that I forgot.
And anyway, US didn't do anything (this time). Ukraine has a right to join NATO if they want, without asking uncle Vladimir beforehand.
by this standard, Cuba has the right to have Russian nukes pointed at Washington DC. But we all know that the US would wipe Cuba off the face of the earth and kill every civilian there before that happened.
They are still under sanctions 70 years later for playing that game and assuming they have territorial autonomy.
The Baltic path to joining was also much faster, announced in 1999 and complete in 2004. The Ukrainian membership was announced in 2008 and had a many decade lead time because Ukraine was expected to tackle many internal issues of corruption and human rights first.
A separate factor is size, population, and location. Ukraine is larger and may have a more strategic position to take out planes and nukes heading to central Europe.
Kennedy ordered a naval "quarantine" to prevent missiles from reaching Cuba. By using the term "quarantine" rather than "blockade" (an act of war by legal definition), the United States was able to avoid the implications of a state of war.
After several days of tense negotiations, an agreement was reached between Kennedy and Khrushchev. Publicly, the Soviets would dismantle their offensive weapons in Cuba in exchange for a US public declaration and agreement to not invade Cuba again.
When it came to Russia and Ukraine, the US refused ultimatums to stay out of Ukraine, and Russia did invade Ukraine a second time.