Putin didn't 'invade Ukraine without rhyme or reason'. He did it because he thought Ukraine would surrender and he could move in without a shot, take over the Donbas region and install a puppet regime. Furthermore, he perceived NATO as weak and dysfunctional (as it was) so would stand by and allow it to happen, just as they did when Russia made a land-grab for Crimea in 2014, The West carried on with Russia business as usual - buying its coal, gas, timber etc.. Just as the West stood back from Syria, where Obama sad 'if they used Chemical weapons it was a red line and if they crossed it, America would act. They did use chemical weapons and America didn't act.
If Ukraine had surrendered, it's debatable whether or not NATO or the West would have done much about it. Like any tyrant, Putin was probably misinformed by those who advise him, because they'll only tell him what he wants to hear, just as was the case with Hitler, Saddam, Gadhafi, whoever.
Putin miscalculated and started something he doesn't know how to finish, but the reaction of Ukraine, Nato and the West will most likely cause him to think twice about trying it on elsewhere. Having failed to take over Ukraine, his aim is clearly, to destroy the infrastructure, damage the economy and target civilians - one war crime after another. After all, if he can't succeed in a land grab, it matters not that he destroys the infrastructure.
His failed adventure is of no benefit to Russian people, to it's standing in the world, and is damaging to it's economy and ours, with no end in sight. What this has demonstrated one more is that appeasement ('peace in our time') doesn't work - only deterrence. If a lamb lies down with a lion, the lamb won't get much sleep.
It will take a generation before this is resolved.
As to 'nukes' the reason the Russians didn't press the nuke button in the Bay of Pigs is that they knew they would be toast. Same goes for Putin and his ilk. (Mutually Assured Destruction').