Thats exactly why they did it. Russia have lost land sizes to countries seeking independent futures away from Russia. Ukraine is doing exactly that, and Russia don't want them to have independent thought and decision making that may not suit the Russian agenda and their historical access to either ports, mineral resources or other strategic sites.
All I hear on here is its NATO's fault etc, but its actually people in other countries gaining a voice and deciding that their future is better suited with the EU / NATO rather than with Russia. Maybe if Putin focused on economic development rather than trying to hold onto historical power both domestically and Internationally maybe those Eastern European nations would be happier to remain connected with Russia as their future economic prospectively would be aligned. The fact that Putin hasn't focused on this, and has instead focused on trying to maintain their military over economic development, has pushed those nations that are gaining their own voices towards EU and NATO as their economic future is far stronger.
Bingo. Would you sign up with the warm and fuzzy woke EU or the Putin/Russia/Djokovic/Serbia evil alliance of corruption and anti-vaxxers.
Not even a choice