When people talk about NATO expansion as a cause of the Russian invasion of Ukraine it tends to fall into a which side are you on argument - Yes it did! No it didn't! Well maybe a bit...
There's rarely much discussion of of how Nato expanded, who pushed for it and when. It's a big topic. There's all kinds of angles to come at it from.
As soon as the Soviet Union collapsed the new countries of the former Warsaw Pact were clamouring to join NATO. It was an insurance against future invasion by Russia - there's lots of history there, going back well before the 1917 revolution - and it was an entry point to joining the western capitalist system - NATO is effectively the military of Western capitalism.
At first the Bush administration wasn't keen - the (iirc) Lithuanian President was told it would never happen, although by the end of the Bush presidency in 1992 the thought was occurring in parts of the administration that maybe NATO expansion might be a good idea for the US. Clinton was keen on the idea from the start. While there were ideas such as disbanding NATO or working towards Russia joining floating about, Clinton wanted to keep NATO as an insurance while working to bring Russia into the western capitalist system - all that money washing about from privatising the Russian state, western governments wanted to get their hands on it.
So it was both the US and the new Eastern European states that wanted NATO expansion.
But there is a lot more to Russian-western relations that has led to this war than the Russian state feeling threatened by NATO. Russian nationalism, wanting to keep Russian money Russian (well, for the Russian elite), has meant Russia has had an increasingly antagonistic relationship with the west, who've been eager to "make Russia a Democracy", which is code for bringing Russia into the western capitalist system so that international companies can get their hands on all that booty those Russian oligarchs want to keep for themselves (as long as the Russian government lets them; get too big for their boots and they find themselves falling out of windows or having a polonium tea party).
It's Zelensky's eagerness to turn Ukraine towards the EU, towards western capitalism, away from what Russian nationalists see as Ukraine's rightful place as part of Russia, that has led to the war more than NATO expansion, although joining NATO is a symbol of, a part of joining that system