Following several hundred years of rule by Poland and then Russia, in 1991 the Ukrainians voted overwhelmingly for independence from Russia. (I assume you think that was a mistake?)
Between 1991 and 2004, two the administrations of two presidents retained close ties to Russia. However, in 2004, in an election festooned with accusations of fraud (serious accusations, not Trump-accusations), another pro-Russian president was elected, sparking protests and a second election, which brought into power another president who called for closer ties with the European Union. (Yeah, this guy: https://en.wikipedia.org/wiki/Viktor_Yushchenko demonstrating the results of not recognizing Russian authority.) Corruption seems to have abounded during most of these and the next president's terms.
In 2010, another pro-Russian president was elected, which in 2013 and 2014 led to the Euromaidan protests, complete with violence, that led to that government's collapse. This was the time when Russia annexed Crimea and civil war broke out in Donetsk and Luhansk. (They should have just given up then, right?)
The next President, elected in 2014, began again the policy of closing the relationship with the EU and withdrawing from the Commonwealth of Independent States, the association of countries from the USSR, and generally trying to clean up the mess. In 2019 the constitution was amended:
"The authority of the Verkhovna Rada of Ukraine include ... determining the principles of internal and foreign policy, realization of the strategic course of the state on acquiring full-fledged membership of Ukraine in the European Union and in the North Atlantic Treaty Organization.
"The President of Ukraine is a guarantor of the implementation of the strategic course of the state for gaining full-fledged membership of Ukraine in the European Union and the North Atlantic Treaty Organization.
"The Cabinet of Ministers of Ukraine provides the implementation of the strategic course of the state for gaining full-fledged membership of Ukraine in the European Union and the North Atlantic Treaty Organization."
(Stupid fools, don't they know they have no rights a world power is bound to respect? They're barely human!)
Also in 2019, Zelenskyy was elected president with 73% of the vote, a group of prisoners were exchanged with Russia, freeing https://en.wikipedia.org/wiki/Oleg_Sentsov, https://en.wikipedia.org/wiki/Roman_Sushchenko and https://en.wikipedia.org/wiki/Olexandr_Kolchenko, among others, and here we are today. (Not that I'm suggesting holding political prisoners is bad, mind you.)
Now, Putin has said that the big mistake happened when Lenin's USSR gave Ukraine any autonomy at all, which may in fact be true. But,
1. The Ukrainians are not victims. Well, they are, but only of Russian aggression.
2. The military-industrial complex seems to have an awful lot of reach and power. Shades of the Elders of Zion, eh? On the other hand, seems like they could have worked a bit faster.
3. NATO does not look to be a very big player; the EU and Poland have had as big a hand in "false promises" if you choose to look at it that way.