It was the US starting and pushing the comprehensive test ban treaty, not the UN. The UN didn't even try until the US successfully pushed it for decades. And STILL, all relevant negotiations are conducted by the US, the relevant backing organization is thoroughly US. It's physically in the US. It's staffed by US people. It's really more or less a branch of the US military, and it's equipment is almost exclusively on US military bases.

Also, the comprehensive test ban treaty is based on mathematical research. Yes, seriously. Who did that research? The US, and they shared it, which changed the calculus of nuclear weapons and allowed the treaty to happen. In fact, a US mathematician is famous for ignoring the US president in an actual meeting with him while doing this research.

Nuclear nonproliferation is a pure US project, that, if we're being honest, does not even really have the support of the US's closest allies. All countries WANT nuclear weapons, and while they cooperate with nonproliferation, they maintain nuclear weapons. That EVEN goes for France and the UK. Hell, even fucking Belgium tried (and, one might add, only stopped once they were absolutely sure they could do it). And, let's face facts: Belgium, along with 100 other countries will try to acquire nuclear weapons again if the US guarantees are violated. If Iran acquires nuclear weapons, for example. Likely, at least Japan and China are maintaining programs that at the drop of a hat, in months, can produce working nuclear weapons. And I'd be AMAZED if both of those countries aren't, at minimum, further along than Iran is. Hell, my money is that at least those two have working nuclear weapons ready. Untested, but ready. Frankly, I'd be amazed if Belgium and even Canada don't have the core of a nuclear weapon ready stashed away ready somewhere (because both countries have the infrastructure needed to produce Nuclear weapons, and they have that infrastructure IN OPERATION (for other reasons, and yes, both countries have valid reasons). Yes they say they're not using it for weapons, but the idea that they're not at minimum "at the ready" is completely absurd to me)

What did the UN do?

The UN tried to solve the Nepal situation. Nepal doesn't exist anymore.

The UN tried to solve the DRC situation. It didn't work, and hundreds of thousands to millions were massacred as a result.

The UN tried to solve the Iran/ISIS/Lebanon/Syria/... conflicts. Eventually the only thing that was solved was the US using it's remaining military force in Iraq to destroy ISIS. The other conflicts are still simmering. Nothing was solved by the UN.

The UN tried to solve the Yemen situation. Nothing was solved.

The UN tried to solve Somalia. The people they tried to protect are no longer there (and most are dead).

The UN tried to solve the Israel situation. You are constantly complaining about what happened, which can be summarized as Israel successfully protected itself with US aid.

The UN, the same people, but under the name "League of Nations" tried to prevent WW2. Germany and the US still claim their actions CAUSED WW2. I'm not sure it's 100% true, but they make a pretty good case.

Besides, it wouldn't even matter, since the UN itself is a US and Israeli project. It would fall apart, even now, without the US.

Oh and you neglect to mention "the other MAD", that also is provided by the US: the guarantee that if one country attacks another, the attacked country will receive at minimum humanitarian aid, likely military aid from the US, and sometimes direct military intervention by the US. This MAD is also a critical component of post-war peace, because many countries would win military conflicts against at least some their neighbors, and where it doesn't work (e.g. Russia) ... we see constant wars.

Your case that countries worldwide are depending and trusting the UN to protect them from military conflict is absurd.