North Korea, the poorest country on earth, has demonstrated how it can be done by anyone. Before that Pakistan and India demonstrated how easily it can be done with minimal consequences.
Poor and small nations will always be at an extreme disadvantage when it comes to conventional military conflict. Taiwan would love nothing more than to have a 100 nuke stockpile right now, it's the only way they don't get invaded and annexed by China against their will. There is nothing that can stop China as things are today, the US isn't going to commit suicide to save them from annexation. Those nuclear weapons are the ultimate deterrence when facing off with an overwhelming opponent, another thing North Korea correctly figured out.
There's no scenario where countries like Pakistan or North Korea don't pursue nuclear weapons to compensate for their weakness or specific context. To say nothing of that pursuit on the basis of conquering rivals or ensuring dictatorships or kingdoms.
Iran is guaranteed to acquire nukes in the near future, both for their desire to be able to stand-off with Israel on an equal footing and to deter the US. Iran can't fight with the US in a conventional manner at all, the US can disable their entire economy and take down their air force and navy without ever invading. There's one tangible solution from their point of view.
If you're Vietnam, and China becomes a monster bent on conquering Asia, with a $40 trillion economy and an unlimited supply of soldiers, how do you stop them from taking your country? There's one answer.
Until there are no very powerful military nations, and all nations have similar numbers of soldiers, budgets and hardware, nuclear weapons will remain desirable for defensive purposes if nothing else.