If Russia invaded Ukraine in 2022 because of NATO expansion, under the same logic they would have invaded Poland, the Czech Republic, Hungary, Estonia, Latvia, and/or Lithuania

If NATO expansion were truly an existential threat to Russia, critics argue, then Russia should have reacted just as aggressively when Poland, the Czech Republic, and Hungary joined NATO in 1999—or when the Baltic states (Estonia, Latvia, Lithuania) joined in 2004. However, Russia didn’t take military action against these countries. So why was Ukraine different?

Why did Putin state he had no problem with Finland and Sweden joining NATO, even though Finland is directly on their borders? If he is concerned about NATO expansion, why not invade Finland before they can join NATO as well?