Come up with a question and reasoning that would justify this answer: 24 October 1945 after World War II with the aim of preventing another such conflict

Show your work and conclude with the exact phrasing "Therefore, the final answer is [answer]." where [answer] is just the final number or expression that solves the problem.
user
The question is: The United Nations (UN) is an intergovernmental organization tasked to promote international cooperation and to create and maintain international order. A replacement for the ineffective League of Nations, the organization was established on 24 October 1945 after World War II with the aim of preventing another such conflict. At its founding, the UN had 51 member states; there are now 193. The headquarters of the UN is in Manhattan, New York City, and is subject to extraterritoriality. Further main offices are situated in Geneva, Nairobi, and Vienna. The organization is financed by assessed and voluntary contributions from its member states. Its objectives include maintaining international peace and security, promoting human rights, fostering social and economic development, protecting the environment, and providing humanitarian aid in cases of famine, natural disaster, and armed conflict. The UN is the largest, most familiar, most internationally represented and most powerful intergovernmental organization in the world.

Answer this question based on the passage: when was the united nations formed and why?
Step-by-step reasoning process: To answer the above question, the relevant sentence is: A replacement for the ineffective League of Nations, the organization was established on 24 October 1945 after World War II with the aim of preventing another such conflict.
