There is one principle to war in economic terms: Wars are costly and they need to make profit or deliver great strategic benefits. Russia may not be able to pay the price nor extract the economic benefit or a prolonged occupation of large parts of Ukraine and may not be able to pay the cost of installing a government hated by the locals.
Let's start with the fact that the risk of Ukraine joining NATO is a CONSEQUENCE of what Russia itself started.
The essence of the latest conflict, or rather the Kremlin's aggression against Ukraine, is different. In 2014, Ukraine showed that POWER is not a pillar around which everyone should crawl on their knees, worship, be afraid, and most importantly, as they say in Russia, "power is given by God, humble yourself and accept." The Ukrainians have shown that power is the PEOPLE, and the people, even with tyrants in power, can replace this power, or force it to leave! the Kremlin authorities do not accept this! There can be no such example close to Russia, especially from the "fraternal people"! Such an example is a mortal danger to the existence of the power of kleptomaniac bandits from the Kremlin! Plus, losing the Ukrainian market, Russia is losing a lot, from the sales market to the supplier of technologies and equipment that Russia cannot produce! After the change of power in Ukraine, Russia decided to "calm down Ukraine" by unleashing aggression, promising to seize all of Ukraine and establish its power there, making Ukraine some kind of invented "new Russia ... But something went wrong, and Ukraine was able to" punch in the face " invaders, liberate partly occupied territories. And the worst thing for Russia is that the President of Ukraine, Poroshenko, CREATED an international anti-Kremlin coalition, in fact forced the West to take sanctions against Russia. After that, the destruction of free Ukraine became a paranoid idea for Putin.
But again, thanks to the help of our Western partners - they managed to create a stock of fatal-protective weapons in Ukraine, and developed new sanctions, which ultimately put the Kremlin in an extremely uncomfortable state - losses and losses will clearly exceed the very dubious chance of defeating Ukraine! But the Kremlin has never waged and will never wage a confrontation against a strong adversary. if you look at the history of new Russia, over the past 30 years - Russia has attacked only guaranteed weaker opponents, where you can show your sadistic inclinations "from the heart" - bomb and destroy peaceful cities, with civilians, destroy, kill, steal ... Otherwise, Russia is a coward to conduct an open confrontation. True, Russia always has one trump card - terrorism. They use this tool both against their own people (remember how in the Russian Federation, the FSB blew up several houses with residents in the early 00s), or against others (for example, poisoning people with highly toxic or chemical warfare agents).