Chapter VII of the UN Charter, I.E. internationally agreed upon law by UN signatories, which Russia as a sitting member of the security council should be obliged to obey, states use of force against another country, especially other members of the UN is prohibited except in cases of self-defense or by authorization of UN Council.
So no, every invasion is not inherently illegal. That’s only explicitly true when you talk about Russia, because like every authoritarian power they only care about rules when they benefit them.
Korea, Iraq, Afghanistan?