The mechanism that prevents Israel’s genocide, Russia’s invasion, Chinese expansionism, North Korean brinksmanship, and American taunting and provocative Imperialism is the same: international law.
As long as the US as the military hegemon rejects international law and courts: efforts to restrict or prevent any of the above will ultimately fail.