It “succeeds” (this term used liberally) because the US is involved.
In the late 1910’s Wilson put all his war chips on forming the League of Nations while at Versailles, but never thought about the US not being involved. Once the League was formed and the US didn't get involved, the other countries really didn't have enough power to keep everyone in line. For example, when Japan was reprimanded for its actions in the Pacific pre-WII, they just left the LN and no one could stop them or penalize them. Not only that, but the League of Nations designer, President Wilson, wasn't actually a participant so no one was sure what they were doing.
However, with the US involvement in the UN, we are a major military and financial power in the world. As a member of the Security Council and a world superpower, we can initiate a world of hurt on anyone who doesn't follow the rules or at least get others to work it out. Again, this leads to the fact that the UN is not especially successful, but it is more successful then the LN. Any country can, and has, just go “pfft, you’all are losers, Im doing what I want.” They might get slapped with embargoes, surcharges, or in extreme cases invasions, but ultimately the UN can't stop them.
hope i helped