In my view, the most important role of the United Nations (UN) in our modern world is the same as it has always been. Its most important role is to make it easier for countries to make contacts with one another so that those countries can be more likely to cooperate.
One theory of international relations (called idealism or liberalism) holds that countries will be less likely to come into conflict if they have more connections to one another. The UN allows countries to make these connections. It gives them a convenient way to cooperate with one another on things like health or ending poverty or preserving sites that are important to world cultural heritage. When countries come into contact with one another on a broad range of topics like these, they come to have more mutual understanding. When disputes emerge between them, they are less likely to escalate because the countries are used to dealing with issues diplomatically and because they have so many ties with one another. Providing the opportunities for such contacts is the most important role of the UN.