How did the buildup of nuclear weapons discourage their use?
Competing nations recognized that nuclear proliferation could lead to global destruction.
Examples of the nuclear proliferation during history include:
US and USSR (Soviet Union) during the cold war (arms race)
India and Pakistan conflict over Kashmir
These conflicts led the opposing countries to threaten each other with the buildup of dangerous nuclear arms.
Despite this competition, the enemies never used nuclear weapons on each other, because they recognized that nuclear proliferation would lead to a nuclear war that could potentially destroy the planet.