As far as I know, except for the aberration of 1990-2020, Ukraine has always been part of some empire, going back at least 3,000 years.
The Mongols, the Tartars, the Ottomans, the Poles, Austro-Hungary, Tsarist Russia, and the Soviet Union, have all controlled Ukraine at various times.
Right or wrong, Putin thinks of Ukraine as part of Russia.
The USA had a similar violent conversation from 1861-1865.
Your information is incomplete.
Ukraine was a briefly independent state after world war one.
It was also a nominally independent polity in the 1400s to 1600s under the Polish Lithuanian Commonwealth and Ottoman borderlands.
Also neither Muscowy nor Ukraine have a history dating back 3000 years.
Heck, 3000 years ago the Balts and Slavs were one people with the Nordic.
This is not similar to the Confederate states.
The best analogy would be austria and Germany.
“Russia” is basically Muscowy and Muscowy conquered territories.
Ukraine is a cousin state but with the PLC as a father, while Moscow’s father is the Mkngol khaganate
Why is Ukraine a full member of the UN and had been since 1945?