"The treaty was created with an armed attack by the Soviet Union against Western Europe in mind, but the mutual self-defense clause was never invoked during the Cold War."
After WW2, it became clear that a new world order had emerged around what would be called "First World" (US-led countries members of NATO) and "Second World" (Soviet Union-led communist countries members of the Warsaw Pact). The "Third World" were non-aligned countries, often confused with "poor countries".
The roots of the current crisis trace back to these power structures. The fall of the Soviet Union and the rise of China could be seen as the beginning of new alignment, but so far, we haven't seen it fully taking shape (China is certainly working on it). Russia, while nowhere near its Soviet Union peak, remains a military superpower and the owner of vast natural resources.
Russia's current role in the world is unstable - there is a dissonance between its hard power and its actual influence in world matters. It doesn't accept being relegated to a weak geopolitical player, and the invasion of Ukraine is part of an attempt to assert its position in the world.