It seems like there still isn't anything solid stopping a great power from aggressive actions against other countries. The UN seems to be falling in the same pitfalls. Can someone educate me?
The conventional wisdom regarding why the League of Nations failed in International Relations scholarship is that it was grounded in idealistic assumptions about the member states, namely that they would all work together for the common good rather than pursue their individual interests. For example, even though Wilson was instrumental in designing the league, he could not get the rest of America to care about collective security, so from the beginning the league was missing what was by that time the most powerful state in the world. Communist Russia was also out because they didn't recognize the legitimacy of other governments. Then over the course of two decades Germany, Japan, and Italy left the league because they wanted to take territory from other countries, which the league didn't allow. This essentially left France and Britain to be the enforcers of the league, and even if they could agree on how to respond to Germany and the other fascist governments, neither had the will or strength to do anything until Germany was invading Poland. In short, the league didn't provide any reason why powerful states should care about enforcing collective security, and many weaker states saw the league as an attempt by powerful states to institutionalize the existing power structure, which favored the U.K. and France with their existing large empires, over Germany, Italy, and Japan who wanted large empires of their own.
Why the U.N. has survived is a whole different topic, but one thing that is different about it is that it gives five of the most powerful states in the world (the winners of WWII) veto power over all major decisions. This gives incentives for those powerful states to stay in the U.N., because their power is institutionalized, and the U.N. can never be used against them. The proliferation of nuclear weapons also gave the P5 the common goal of preventing a nuclear war. So now, the most powerful states in the world have a common goal, and the U.N. gives them special privileges that the league did not. This partially explains why the U.N. hasn't fallen apart like the league did.