In 2014, on the eve of Russia’s original (this century) invasion of Ukraine, the support for Ukraine joining the NATO was in single digits. Obviously, it increased as a result of the invasion.
Hence, saying that Russia invaded Ukraine to prevent it from joining the NATO is stupid.
Putin uses the existence of the NATO as an excuse to invade. Where NATO doesn’t exist, he invades anyway (see Central Africa, Syria, etc). The appetite for invasion exists independently from the NATO. If the NATO disbands today (which I support), that would have no impact on Russia’s desire to invade Ukraine, Georgia, African countries, etc.
The idea that Russia invades XYZ because he’s worried that the NATO will come close to Russia’s borders was concocted in the 1990s in the US. It was ludicrous then and it remains so today.