It is far from hilarious. Russia invoked the UN charter, Article 51. Here is an article that disagrees with Russian action, and makes a fatal flaw in that disagreement, but it does explain Article 51 pretty well.
https://lieber.westpoint.edu/russia-special-military-operation-claimed-right-self-defense/
Your logic of Russia attacking the US is specious. Russia feels provoked by the US through Ukraine. Attacking the US will not removed the troops killing people in the Donbas since 2014.
The small majority of Ukrainians - without the Donbas and Crimea - want to move west. That is what started the shooting in 2014.
A neutral/slightly pro-Russian government was democratically elected. The US backed a coup that overthrew that government and installed a constitutionally illegal government. The Donbas and Crimea would not accept the new coup government.
You are incorrect about NATO membership as well. NATO countries are not a monolith. I fully agree that the Baltic states REALLY hate Russia and joined because they wanted to. Other countries, like parts of the former Yugoslavia, were coerced. Between those extremes is a large bandwidth.