Ukraine wasn’t trying to join NATO before Russia invaded neighbors including Crimea in Ukraine,
2018 and 2019 were well after Crimea, and the popular opinion in Ukraine shifted towards NATO in 2008 because of the Russian invasion of Georgia in 2008, one of said neighbors.