The UN actually does prevent war, according to study of General Assembly votes

The United Nations has been effective at suppressing conflict throughout its history, according to an analysis of more than 65 years of voting records conducted by Dartmouth College and The Ohio State University. The study presents evidence that the U.N. acts more than just a bystander on world events, and that it provides a forum where diplomacy reduces the chance of war.