Ukraine has been flirting with NATO membership and has been moving westward as far as relationships and influence goes for a while now. NATO is a defense pact which members join democratically and willingly, nobody is forced into it. Putin is concerned that he is losing his grip and sphere of influence on Eastern Europe. He's also former KGB and believes the dissolution of the USSR is the greatest tragedy of the 20th century (as if there wasn't a holocaust or countless Soviet dead during the battle of Stalingrad for a more localized example.) This invasion is Russia spitting in the face of NATO to attack an economically stable democratic democratic nation with western ambitions. As shytty as this sounds, people tend not to care about struggling nations with weak or autocratic governments like they do about nations like Ukraine, who could easily fit in with EU/NATO nations if not for their neighbors chipping away at their borders.
Not only this, it's one of the first major conflicts on European soil in decades. The relative peace and stability the world has experienced lately has been built on the threat of reprisal for violating it and by the spectre of nuclear Armageddon. This is an authoritarian testing the limits of this stability by invading a sovereign nation and daring the world to do something about it. If they do something about it, it could get nuclear hot VERY quickly. If they do nothing, every autocrat with expansionist ambitions will immediately start taking land from their neighbors since Putin got away with it. Some of those autocrats and their neighbors are far more likely to spark a global military response and are more likely to result in nuclear conflict or millions of deaths (like China's desire to annex Taiwan)
Basically, there's no easy answer. Respond militarily, might spark WWIII. do nothing, sovereign nations are fukked if they have aggressive neighbors, eventually, one of those neighbors will drag their friends into conflict sparking WWIII. If china sees the world reaction to this and decides to invade Taiwan, shyt could get apocalyptic real fast. There's a gun to the world's head and we're being forced to watch a friend get beaten to death in a one sided conflict of conquest.
This has echoes of Germany's invasion of the Sudetenland in 1938. We saw what appeasing Hitler did back then, only this time there are nukes.