Putin's agenda has been set since his rise to power in 1999, and all comes from his dismay at the collapse of the Soviet Union during the 1990's which, in his eyes, undermined Russian security. The break-up of the Soviet Union into the current Eastern European countries as can be seen today has left Russia feeling exposed to Western invasion due to the geographical landscape of the Russian border. Putin's fear of a Western Invasion has steadily increased over the years and the first signs of aggression was the annexation of Crimea in Southern Ukraine in 2014. A further stressor has been the continued alliance of NATO forces across Eastern Europe as former Soviet Union countries join leaving Russia exposed to threats along a 2000km border.
Putin's invasion of Ukraine is to create a buffer zone between Russia and NATO as he believes if Ukraine has a Pro-Russian government it will give Russia the breathing space. However, Ukraine alongside Moldova and Georgia have all openly supported NATO but due to their proximity to Russia and pro-Russian militia have not yet been accepted. Furthermore, global concerns of the exact current situation of war have so far hindered these countries admission into NATO.
Ukraine's violence in 2014 to over-throw the Pro-Russian president and implement a more western looking government was a further stressor to Russian politicians as Ukraine moved towards western countries for development and away from the politically strict Russian way of life. Fighting has been happening in Ukraine for nearly 8 years but this sudden invasion is a dark day in European politics.
There is still so much more to this situation and the reasons as to why it has happened but in reality it just should not have done :(
If you're interested in this or want to learn more about why conflicts happen/ are happening around the world then i cannot recommend Prisoners of Geography by Tim Marshall enough.
My heart and prayers go out to the Ukrainian people and I hope this war comes to an end soon so this unnecessary loss of life can end,
Stay safe everyone