Underground nuclear testing is against international law.
So what, world powers have broken international laws without consequences ( from the perspective of NK) and after US and I presume, Russia and China conducted their nuclear tests, then they pass laws making things illegal. Says KJU : "Bullocks!"
https://en.m.wikipedia.org/wiki/Nuclear_weapons_testing
China is shielding NK for reasons of self-interest.
China has stated in not so many words that they will not allow NK regime to collapse (hint). And when Putin stated that there will be PLANETARY catastrophe, he appears to be hinting that if US nukes NK, Russia might not like it - another way of putting DT words of 'fire and fury.'
There is not much the US can do at this point, NK having ICBM with thermonuclear tips. Either wipe out the present gov as it did with Saddam, destroy NK, or give KJU what he wants under the guise of diplomacy.
Thus, if US really wants to take away the cookies from KJU, it won't be easy.