For the 8 years from 2014 to 2022 Ukraine was intermittently attacking and shelling these breakaway territories (excepting Crimea, which had become part of Russia) which were (and are) largely populated with ethnic Russians, and Russia was "secretly" protecting them. This led to a series of treaties, The Minsk Accords [1], to try to arrange peace between Russia and Ukraine, and give the breakaway territories some sort of special status while remaining under Ukraine.
These treaties were always violated. And while this was happening Ukraine was increasingly fortifying and arming itself, as well as seeking to join NATO - which NATO was, sincerely or not, indulging. This all really set the stage for where we are today. It also sets the stage for where we're going tomorrow, because the inability to maintain any sort of a peace over these regions is going to make obtaining a 'minimally unfavorable' settlement for Ukraine, over this war, much more difficult.