The US didn't stop invading, and neither did the USSR. But the one principle was that waging war for territorial gain is no longer acceptable.
After WWII, the major countries understood that while it's impossible to completely outlaw war - states will find real or imagined reasons to attack each other - if we agree to freeze borders, most of the motivation for waging war will go away.
And it worked. After 1945, no developed country started a war against a peaceful neighbour to perform a land grab. The very few exceptions where annexations did happen were in the context of pre-existing state of war, and even so were not recognized by the international community (e.g. the Golan Heights).
But actually invading a country which doesn't threaten you and annexing part of its territory? Didn't happen after 1945.
Until 2014. Welcome to the new era.