America nuked Hiroshima and Nagasaki as a last resort. Ever heard of the Cold War? A perfect example of why we need to follow the rules of war - because if we don't, if all the nukes go off, everyone dies. There is no post apocalypse. Is the US launches nukes, then Russia launches nukes. If Russia launches nukes, China launches nukes. And then everyone with a nuke starts launching them, and all life on earth ceases to exist.
And, another example of this restraint thing: The US refused to get involved in the war in Ukraine because if they did, all of Russia's allies would attack the US, so all of the US' allies (the UN and NATO) would attack Russia, and we'd have another World War on our hands, because EVERYONE is in the UN.