With nuclear weapons, there is no effective defense. As a result, unless or until universal disarmament can be achieved, arming to prevent war can only mean nuclear deterrence. The US and the Soviet Union overdid deterrence by a large factor in my estimation, but the general view is that it seemed to work in that particular situation. The key assumption of nuclear deterrence is that the prospect of a single weapon dropped on a single city makes any war of conquest unattractive. Equally important is that the inevitable devastation was obvious to all ahead of time, so that the usual demagogic arguments for war failed and for the most part were not made.
No one pretends that what I have just said about nuclear deterrence is the whole story. For one thing, there are many traps and dangers in the actual practice of nuclear deterrence. What is to be done, for instance, about challenges that don't directly involve the risk of nuclear war but might do so down the line? There were plenty of such challenges during the Cold War, in Korea, in Berlin, in Cuba, and in Israel.