It's true, the UN has many shortcomings, and it's certainly not anymore suited as a source of moral authority than certain national governments, as some like to believe.
The major flaw, of course, is the contradiction between the international law principle of equality of all member states, versus the obvious differences regarding respect for human rights and democratic standards between the member states. International law enforcement may prevent war between states, but it's not suited to keep dirty dictators from massacres against his own population or minorities, or general oppression -- according to international law, that would be "internal affairs". According to international law, countries like North Korea and Sweden are legally equal.
Another major flaw is political abuse of the UN by certain member states, especially the Security Council members, for their own interests. During the Cold War, both USA and USSR blocked various decidions for partisan reasons within the bloc confrontation. Today, that still sometimes happens when either US, Chinese or Russian interests are concerned. The permanent members of the SC hardly give a fair representation of worldwide influence and importance of member states.
But despite all these flaws, I think the UN is a necessary institution that has done by far more good than bad on this planet. It's the only institution that is considered a more or less fair, impartial and neutral force in many cases suited to deescalate regional conflicts and surveil the enforcement of peace contracts. And indeed, the UN has indeed managed to deescalate many crisis situations, prevented various conflicts and supported reconstruction and deescalation after regional conflicts have been ended. There is no other institution that could play this role, certainly not the US.
The UN are certainly flawed and it's hardly the answer to war and oppression on this planet, but it's definitely a useful and necessary tool for conflict prevention and peace enforcement.