We have many nuclear weapons. They have immense power. At one stroke they can devastate countries. Their potential power as a deterrent is unrivaled. The core territory of a nuclear armed nation is inviolate. There've been a couple conflicts over peripheries (in Kashmir, Egypt attacking the Sinai Peninsula, Indian and Chinese soldiers periodically beating each other up in the Himalayas), but there can be no invasion which threatens the existence of the nation. It is conceivable that we could, if we chose, prevent any invasion, anywhere around the world. No country would dare invade another if they knew we would nuke them. Therefore, world peace?
Unfortunately, nuclear weapons are useless. Any other nuclear armed nation knows that we cannot use our weapons without inviting retaliation in kind. Further, any non-nuclear armed nation knows that so long as the war is small enough, the international community would not countenance the use of nuclear weapons. Because all the countries who could wage wars big enough to warrant nuclear intervention already have nukes themselves (or have no interest in a war anyway) nuclear weapons prevent no war outside the core. They can’t stop anything, because retaliating would be insane, and there’s no way to establish our credibility.
So let’s be insane, shall we? If everybody thinks we’re so crazy that we’d retaliate for clearly defined provocations - they’d never do anything to provoke retaliation. We could say to China, “If you invade Taiwan, we will use nuclear weapons,” and reduce the chance of invasion to zero. We could prevent any invasion, anywhere in the world.
We would have to give a convincing display of how nuts we are. What if we nuked ourselves? Suppose we nuked a small town, chosen at random. If the town is small enough, we might predict, at most, 20,000 people will die. Given that the war in Ukraine has already killed at least 15,000 people, (and that's as of April 4th) it should be pretty obvious that preventing all wars would, on net, save lives.
So why not? I don’t think it would work out as intended; for starters it is unachievable for political reasons. A more pressing danger is if they think we are so crazy it is necessary to preemptively strike. Given the massive death toll from any such war, even a small increase in the odds would greatly outweigh the benefits. It is also a good a rule of thumb that when probabilities are so uncertain, we should avoid doing bad things. And even if it did work? Perhaps we find it would save lives — should we do it even then? Ought morals count for anything? And why?
I dunno. It’s just something to consider. :)