NATO was formed on Russia's borders, it didn’t need to expand to reach them.
And countries near you joining a regional security arrangement isn’t a casus belli, most especially not against completely different countries that you have already succeeded in getting the alliance not to admit, thereby also quelling the country’s interest in joining the alliance.
I know Russian propagandists like to point to the renewed interest in NATO membership Ukraine developed in 2014 for the war, the problem with that is that that interest (aside from not justifying the war in any case) was a direct result of Russia launching the war of aggression.