The main role of the U.N. is to maintain global peace; in the case of the Cuban Missile Crisis, the U.N. was successful in maintaining peace.
While the Cuban Missile Crisis posed a significant threat of nuclear conflict, diplomatic channels facilitated by the U.N. played a key role in de-escalating the situation and preventing war.