How have nuclear weapons helped us against invasive and terrorist actions?
Has it somehow stopped conflicts between major powers (NATO, Russia, China)? No more than would be expected from countries that don’t really order each other and aren’t pursuing aggressive territorial expansion that threaten each other.
Has it ended all wars? Obviously not, given that Vietnam, Korea, Iraq, Afghanistan, and Ukraine all happened.
Has a nuclear deterrent made nations more peaceful? No, but globalization has.
A nuclear deterrent exists solely to discourage other nuclear-bearing countries from trying to cripple you. The only steady-state for this is that everyone who is under threat by a nuclear-bearing country will eventually develop nuclear weapons.
In recent history: the Americans because of the Nazis, the Soviets because of the Americans, the British because of the Soviets, the French because of the Soviets (and, to some degree, the British), the Chinese because of the Americans AND the Soviets (they really got unlucky here), the Israelis because of literally everyone (extra unlucky), the Indians because of the Chinese, the Pakistanis is because of the Indians, and the North Koreans because of the Americans. And of course, today Iran is trying to build up a nuclear arsenal to combat Israel’s nuclear arsenal.
All your policy will do is incentivize everyone to develop nuclear weapons.