The Ukrainian president was voted in democratically with 70%+ of the eligible vote. Our current president cannot claim that, even. I'm not familiar with how "legit" the Ukrainian election is, but I do know that Russian's election system doesn't have a stellar reputation. So that places me on the side of Ukraine, although sadly they simply cannot win this fight alone and seemingly have not invested in (couldn't afford) a strong military.
At one point, Ukraine officials requested any able bodied European to come to Ukraine and fight if they wanted to. I'm sure they'd be cool with a bunch of long range shooters from America showing up ready to post up and work out their DOPE cards on their 27 lbs. competition rifles.
All that said, I have to wonder if NATO simply stating they would not allow Ukraine into NATO would have prevented this.
I also have to wonder if Western Europe simply sending in half as many troops as Russia was amassing would have stopped this.
I'm not the one in the strategery rooms making these decisions, but interestingly Russia is having to/choosing to come up with some extreme reasoning and propaganda to justify this action and Russians are buying into it (just check LinkedIn, even... even there it's heated). Seemingly, according to Russia, Ukraine is run/controlled by Neo-Nazis (which isn't true, although they do own quite a few of those types... and so does the US and Germany and Poland and so on). I have a hard time believing Russia actually cares about that but Ukraine has also been active militarily in the separatist parts of the country, but that is to a large degree understandable and arguably justified considering it's land claimed by Ukraine that is pro-Russian separatist and anti-Ukraine government.
To me it was so obvious when Russia took Crimea that they intended to do this at a later date, when global politics allowed. Just look at a map. Crimea is an incredible strategic staging ground to pounce into Europe from and to control water from. The fact we allowed it, I believe, empowered not only Russia but China to fast-motion land grabs. China will take Taiwan next, just watch. I expected, frankly, the US to do something militarily in Ukraine because it is so close to NATO allies, but when China takes Taiwan, I suspect we do absolutely nothing.
Also, I don't know if they expected a pandemic but they knew, based on how we reacted to it, it would wear the Western world down. They certainly knew that once the US finally got out of Afghanistan it'd be a cluster no matter which president did it and the American population (and, in kind, the European population) would be uninterested in more war. Mix pulling out of Afghanistan with 2+ years of pandemic costs/inflation/mental tiredness, and this was the obvious time for Russia to make a move. Russians aren't stupid people -- they're skilled strategists with incredible patience and pay extraordinary attention to Western geopolitics and develop plans for it. As a collective, they are very tough cookies, too.
I don't know what the US should do, but it was obvious to me that the staged waves of sanctions would do nothing. Russia will take what it wants in Ukraine within a month. It will likely install a pro-Russia government and establish a security presence, but otherwise leave. It cannot afford a prolonged war and, just like the US, it isn't good at fighting separatist/terrorist-style wars, which is what a Ukrainian resistance would be. Russia wants its buffer zone from Europe. It's anti-democracy in Western form and it's obvious why, but that country could be a greater superpower than the US and China (potentially combined) if it did join the Western cause. The US is the "Western zenith" economically and militarily. Russia could easily become that at a rapid pace with truthful alliance to the West. It chooses not to because it borders China... and China won't like that one bit.
All in all, I care about what China is doing 10x more than Russia. China has stolen manufacturing with inhumane labor wages, China has stolen technology with a systemic and cultural animosity toward intellectual property rights, China has began spreading its military out into oceans and into neighboring countries. China is the reason North Korea still exists (those poor people). China is the threat. And we have allowed China to gain steam and we have incentivized Russia to partner with China, not the West, and therefore if we do end up in a WWIII with China, I suspect Russia will join China. A combination of Russia and China against the United States, Canada, and whatever Europe can muster will be the end of days.