Nuclear weapons are a totally neutral technology with no particular affordances. That they can be used to kill people is totally beside the point and irrelevant to any discussion about their merits and downsides.
In particular they offer their owner a high maintenance decaying shelf life, or an explosion.
Of the 2,476 explosions to date, two were used specifically to kill people, some of the others did kill people, although such things were supposedly unintentional.
They have not afforded a better way to make canals, mine in a controlled manner, or fart a starship to space .. although people have desired such affordances.
That is why firearm engineering has hardwar level safety (firing pin blocks, drop safeties, heavy trigger pulls) and why manufacturers still face strict liability when a gun fires on its own… regardless of intent.