There is one really simple fact explaining why Ukraine wants to join EU.
Polish and Ukrainian economies were exactly the same size in 1991 after collapse of the Soviet Union. Ukrainian economy was actually a bit bigger in 1990. We had almost the same population of around 40 million people, similar location and culture.
Yet, in 2013 Polish economy was almost 3 times bigger than Ukrainian ($521B Polish GDP / $190B Ukrainian GDP = 2.7). By 2021 there were almost 2 million Ukrainian economical immigrants in Poland.
Many Ukrainians conclude that being in western sphere of influence is just economically better.
Noticeably better, by example of Poland, maybe even 3 times better.
Putin on the other hand is afraid that if Ukraine becomes richer than Russia, then Russians will also start revolution. Hence the desire to subjugate or destroy Ukraine by all means.
And having your land invaded and annexed by Russia (2014 annexation of Crimea) kind of makes you really want to join NATO. Nobody, not even Putin, could have foreseen that.