Congress gave him an after-the-fact pass on that, which should surprise absolutely no one.
The thing about going nuclear is there are a number of steps - and people - between his little brain and the Big Red Button. The military ones in that circle might cite US military doctrine about the use of nuclear weapons and their oath to serve the Constitution - not the President, because they don't want to spend the rest of their lives visiting their family through plexi.
Trumps words about wiping out a civilization might be quoted in some future trial at The Hague. As a non-signatory, the US officially doesn't care, but Hegseth and a few military commanders might find their ability to take offshore vacations for the rest of their lives kinda limited. Trump's probably too old to care.