North Korea is making Nukes to threaten the world with. And is a tiny shithile country with an already destroyed economy.
It helps to be claiming to be acting in humanity's best interest instead of obviously being a despot. Think about the political aftermath of interfering with someone claiming that they are trying to save the world and having a reasonable argument that is the case.
Someone attempting this would likely be in a major country and would likely have the approval of most of the countries. If the USA attempted no amount of embargos could stop them, the same with Russia and maybe a few other countries.
It is even possible that Germany, France, Israel or South Africa could pull it off with a little politics and clandestine dealings. They could delay politically and pester larger nations and demand UN actions while continuing development.
If the US and Russia were dead set on stopping they could with a few bombing runs from aircraft carriers. I don't think that is likely because neither of these countries is crazy and would love to be saved at no cost while having a political bogeyman they can use in the future.
EDIT - Have an upvote for a thoughtful and reasonable reply though.