AI claims it is Article 2, Section 4 of the UN Charter, prohibiting states from using force or threats against another state's territorial integrity or political independence, forming a cornerstone of international law.
Note: UN's use of the term "states" is essentially the sovereign, independent political entities we call "countries.
Meh. Sounds pretty weak.
Article 2(4)
Article 2(4) has been described as the cornerstone of the UN Charter and one of the foundations of the modern international legal order. It states the following:
“All Members shall refrain in their international relations from the threat or use of force against the territorial integrity or political independence of any state, or in any other manner inconsistent with the purposes of the United Nations.”
While the article codifies the prohibition on the use of force, the UN Charter also provides two key exceptions for when force is justified. The first is the inherent right to self-defence under Article 51, and the second involves authorization by the UN Security Council under Chapter VII. Beyond these codified exceptions, controversial practices such as humanitarian intervention and the Responsibility to Protect (R2P) doctrine have emerged, though they lack formal recognition under Article 2(4). Despite Russia’s efforts to justify its actions under the UN Charter, leading scholars have characterized Moscow’s invasion of Ukraine as a “flagrant,” “unambiguous” and “egregious” violation of Article 2(4).
https://warroom.armywarcollege.edu/articles/un-article-2-4/