The Founding of the UN was in San Francisco at the Quebec conference in August 1943. The Secretary of State Cordell Hull and British Foreign Secretary Anthony Eden agreed to draft a declaration that included a call for a general international organization based on the principle sovereign equality of all nations. An agreed declaration was issued after a foreign ministers conference in Moscow in October 1943. When president Franklin D. Roosevelt met with soviet premier Joseph Stalin in Tehran Iran in November 1943, he proposed an international organization comprising an assembly of all member states and a 10-member executive committee to discuss social and economic issues .U.S, British, Soviet, and Chinese representatives met at Dumbarton Oaks in Washington in August and September 1944 to draft the charter of a postwar international organization based on the principle of collective security. Representatives of 50 nations met in San Francisco April-June 1945 to complete the charter of the United Nations.The senate approved the UN Charter on July 28,1945 and then the UN came into existence on October 24, 1945 after 29 nations had ratified the Charter.
Here’s a video that explains more!! https://m.youtube.com/watch?v=QoIafzc0k74