To give a brief summary, it was never a question of dispute. When the Soviet Union collapsed and referendum was held in Ukraine, all regions voted to become part of the new independent country with a 80%+ in favor, with the exception of Crimea of a slim majority. To give context, the south and east are predominantly ethnic Russians and native Russian-speaking ethnic Ukrainians, while the north and west are ethnic Ukrainians. Though, Kiev has always been a Russophone city.
In any case, every election has been split between pro-Russia/Russophone v. pro-Ukrainian nationalism/pro-west candidates. And over the years, they've had a massive protests. In particular around the time of elections, against oligarchy, corruption, electoral irregularities, abuse of power etc. The first revolution occurred in 2005 (Orange), and the second in 2013 (Maidan) was different. The latter was caused by president Yanukovych declining to sign a major trade deal with EU to instead be closer to Russia. Which Putin/Yanukovych blame on US/west through 'meddling and instigating' to make Ukrainians turn on Russia.
The protests turned violent, Yanukovych was then impeached by parliament which he deemed unlawful. The new gov't issued warrant for his arrest, he fled to Russia and requested help from Putin who called his ousting as a 'western backed coup'. This lead to counter-protests by the Russian speaking Ukrainians. Russia already had military troops in Crimea through previous agreements, but they decided to annex it. Pro-Russian separatist, with Russian help, decided to also take over Luhansk and Donetsk and declared to be independent. This triggered war with Ukrainian army and they have been fighting ever since. Ukrainian gov't then aspired to join EU and NATO to counter Russia, which Putin opposed.
Several attempts have been made to end the war. The Minsk agreement (2015) reduced the fightings. A draft of solution was made for Ukrainian gov't to give these regions a generous autonomy and self-rule. But they refused on the ground that it would give space for Russia to indirectly control/influence them and were not on board with treating them different from other Ukrainian regions. The stalemate went on until Russia basically invaded them in 2021.