"WE THE PEOPLES OF THE UNITED NATIONS DETERMINED to save succeeding generations from the scourge of war, which twice in our lifetime has brought untold sorrow to mankind, and to reaffirm faith in fundamental human rights, in the dignity and worth of the human person, in the equal rights of men and women and of nations large and small, and to establish conditions under which justice and respect for the obligations arising from treaties and other sources of international law can be maintained, and to promote social progress and better standards of life in larger freedom"
The real prevention starts when the collective body deploys troops (or authorize the deployment). The last such real deployment, authorized by UN, was for Iraq (Saddam Hussein), who really could start the WW3. But you know how it's portrayed now by authoritarians, so I doubt we will see any real action from UN anymore until the WW3 happens.
Uhm, my understanding is that the main UN purpose is to prevent WW3. It was thansformed from the League of Nations that was created after The World War, but obviously failed on its mission with the WW2.