Jens Stoltenberg, NATO secretary general, said explicitly that Russia's invasion of Ukraine was because of NATO expansion.
"The background was that President Putin declared in the autumn of 2021, and actually sent a draft treaty that they wanted NATO to sign, to promise no more NATO enlargement. That was what he sent us. And was a pre-condition to not invade Ukraine. Of course, we didn't sign that."
https://www.jeffsachs.org/newspaper-articles/nato-chief-admits-expansion-behind-russian-invasion#:~:text=Here%20are%20Stoltenberg's%20revealing%20words,condition%20to%20not%20invade%20Ukraine.