Let's assume a nuclear exchange happens at some point during a war. There is a very high chance that this will cause an escalation leading to a nuclear apocalypse.
Since this result is presumably inevitable at increasing frequency, it's more like nukes prevented another major world war and stole a form of peace from the future, temporarily. That peace debt might be repaid with the end of everything.