Some timeline that can help understand the context a bit:
-2012: A large reserve of natural gas is found in the region/sea of Crimea. That along with new tech in exploring underground resources, which would allow exploration of other existing reserves in the country, made ukraine one of the largest reserves of natural gas in the world. Current government was more aligned with Russia.
-2014: The Ukraine protests happened. The coup that saw heavy western support, coincidentally, put a pro-west pro-EU government in charge exactly two years latter after the reserves were found, coincidentally. Also coincidentally, getting those resources from Ukraine would allow west europe to be less dependent on Russia for gas.
2014-2021: Russia didn't recognize the new government and started supporting separatists group, that were basically the previous pro-russia government, in regions that coincidentally are close to the gas reserves, making it impossible to explore the reserves properly. Russia also took Crimea, which prompted the Ukraine government cut its only water source coming from Ukraine, causing a severe water crisis for the 2000000 civilians living there, one that was also weighting heavily on Russia's pockets (liberating the river was one of its goals in this war).
A pro-west Ukraine not only threatens Russia existence as the major supplier of natural gas to Europe, but its also a critical strategic location that allows its territory to be invaded more easily. Meanwhile, US is desperetally doing everything they can to discredit and discharge a heavily anti-interventionist president from its seat.
2022: Ukraine will be joining NATO, which might, coincidentally, help them kill off any ongoing war/rebellion with the separatists groups and retake lost territories like Crimea, letting them finally start exploring their reserves and eventually supplying Europe with it.
Then Russia invades.