Russians regard the ancestor of the Russian state to be the Kievan Rus, that was an early medieval kingdom, and from which the name Russia is derived. It was dependent on trade with the Byzantine Empire and began to decline as the Byzantines declined. The Mongols finished off the Rus. So, the Russians feel an emotional/patriotic attachment to Ukraine as part of the Rus.
Lviv/Lvov is a different story. It was part of the Hapsburg Empire but was ethnically Polish. When Poland gained independence it was part of Poland. But British and French diplomats redrawing the map of Europe after WWI invented the "Curzon Line" as part of the new, independent Poland's boundary. They put Lvov on the Russian side. They later amended the Curzon Line to put Lvov back in Poland, but the damage had been done.
After Poland was created, the Soviets attacked, hoping to dominate Poland as Russia did before the War. It backfired. Poland won the war and conquered territory it had not been awarded.
Stalin and Hitler partitioned Poland in the Molotov/Ribbentrop Treaty, Stalin getting everything East of the Curzon Line, including Lvov. He never gave it back.
But, the story is more complicated. After the Mongols were pushed back, the medieval Grand Duchy of Lithuania ruled Western Ukraine and Kiev. Lithuania merged with the Kingdom of Poland and Western Ukraine was part of Mitteleuropa for centuries. Russia took Kiev, but not parts West.
During the Napoleonic Wars, Poland was the subject of another of the corrupt bargains that have bedeviled the country. Russia, Austria and Prussia agreed on the Partitions of Poland. Russia got the lions share, including Western Ukraine. Lvov went to Austria. Poland disappeared from the map for two centuries.
It is true that at the Yalta Conference, Roosevelt and Churchill tried to persuade Stalin to give Lvov back to postwar Poland. However, at the time of Yalta the Russians had conquered all of Poland and almost all of Eastern Europe. They were 40 miles from Berlin. The Americans and Brits had no bargaining power on this point.
As we know, the Soviet Union created the fiction that it was nothing more than a union of independent republics. Lvov/Lviv went to the Ukraine republic. At the time, the commies had no idea that one day the Union would be dissolved and those republics really would be independent.
So, the bottom line is that Western Ukraine and Kiev really were part of the West for centuries. Eastern Ukraine was taken in war by the Russians from the Turks and Tatars. Very different histories and the people have very different mindsets.
Remarkably, in recent years many in Eastern Ukraine seems to have acquired a taste for living in a country that while very corrupt is more free and Western looking than Putin's Russia ruled as an authoritarian state by a dictator for life.
When in fact it is Mongolia.