C. by providing a way for nations to discuss global affairs and set goals.
The United Nations facilitates dialogue among member states, promoting cooperation on various issues such as peace and security, human rights, and sustainable development, thereby shaping global affairs through consensus-building and collaborative efforts.