The United Nations as at today deals with a number of problems in society. As is expressed in the 17 Sustainable Development Goals (SDGs). Issues which range from climate change, world poverty, hunger, health and so on.
But the main reason why it was created was to prevent another conflict that will involve the whole world. After World War I, the League of Nations was formed in an attempt to forestall a recurrence of the conflict but that didn't work because the league didn't have a force of its own and nations found it hard to commit to resolutions among other problems.
As we know, this led to another major conflagration a short while later in World War II. When the United Nations was formed they had lessons to learn from the League of Nations that came before.
They have increased their resolutions and in the past few decades, nations take seriously the need to commit personnel and resources to conflicts.
In all it has succeeded in bringing nations in check, moderating in many of the worlds affairs so as to prevent escalation in many major areas thereby improving peace in the world.
To maintain and assist the host countries on the difficult path of conflict to peace, the UN carries out the following operations:
Facilitate political processes, protect civilians, assist in the disarmament, demobilization and reintegration of ex-soldiers, Support constitutional processes and the organization of elections, protect and promote human rights, and assist in the restoration of rule of law and to extend the legitimate authority of the State.
Its peacekeeping operations receive their mandate from the Security Council; their troops and police forces are provided by the Member States; and they are managed by the Department of Peacekeeping Operations, and supported by the Department of Field Support at United Nations Headquarters in New York.