The NKs want nukes for exactly the same reason the Iranians do. Absent nukes they are at risk of getting the Iraq or Libya treatment: regime change at the whim of somebody else. With nukes they are far less likely to be challenged that way. There is nothing insane about wanting to deter what looks from your POV like a bully or group of bullies. In statecraft (but not so much in warcraft) nukes are a great equalizer.
So their only challenge is getting from “no nukes” to “some nukes” without being stopped. And our (read as either the US alone, or the free world, or the whole UN as you see fit) the challenge is to stop them.
We have had a lot more levers to pull with Iran than with NK. One advantage to being hermetically sealed is you’re more or less a porcupine; there’s nothing exposed for contenders to grab or pull on, and there’s nothing the porcupine wants from the contenders either.
It becomes a game of chicken: are you, President Wayne, prepared to unilaterally attack NK (& largely destroy Seoul) today? if not, how about tomorrow? Anything less than that will not produce prompt regime change. So what combination of circumstance, provocations, etc. *will *be enough for you to start that fight? Tough decision. Doubly (quadruply?) so unless you can convince the Chinese (in advance no less!) to help, not hinder.
Most of all the rest of what’s being done every day is behind the scenes. There is spying, economic undermining, pressure & cajoling applied to China, military prep, sanctions, talk, and talks about talks, and talks and talks. All of which has some effect, although it’s always difficult to know how well any of that stuff works. In all of statecraft you can never re-run the experiment.
In all there is persistent (and IMO well-founded) belief in the halls of power that NK can be contained without bloodshed almost indefinitely until it collapses of its own contradictions. Which collapse might produce a wargasm of its own, but at least it’ll be a weak one with the huge moral and propaganda benefit that they started it, not the Good Guys.
Even better if instead of collapse it takes the Myanmar or Soviet route and goes through internal regime change and reform. Exactly the process we hope will occur in Cuba in the next few years post the ever older Castro brothers. And which process we are actively fostering whenever US domestic politics doesn’t get in the way.
TL;DR: NK wants nukes to ensure they won’t be regime-changed. Pretty sensible goal from their POV. Them actually firing one at the US or Japan ensures they’ll be regime-changed a few minutes later at several thousand degrees C. That is inimical to their interests. Ergo, they won’t fire one. Caveat: unless insane. Welcome to statecraft; a complex and nasty business.