[This thread] (https://www.reddit.com/r/AskHistorians/comments/t1mco4/why_did_russia_inherit_the_soviet_unions/) including an answer by /u/ted5298 goes into why Russia was chosen as the primary successor state to the USSR in the United Nations.
Some background on those four days, from a previous answer I wrote:
PART I
The idea that the USSR existed in Kazakhstan alone for four days is I suppose technically true from the point of view that it was the last Soviet Socialist Republic to declare independence, although what happened in Russia on December 12 was specifically that the Russian Supreme Soviet (the republic legislature) approved unanimously the Belavezha Accords of December 8 between Russian President Boris Yeltsin, Ukrainian President Leonid Kravchuk and Belarusian Chairman Stanislav Shushkevich. This agreement abrogated the 1922 Treaty of Union creating the USSR (Russia, Belarus and Ukraine were the remaining original signatory republics to that treaty). The Russian Supreme Soviet also recalled deputies to the Soviet parliament.
It wasn't really clear that any of this was actually legal. What was left of the increasingly-shrinking Soviet federal government, including Soviet President Mikhail Gorbachev, clearly did not think so. Even the other republic heads were irked that the "Slavic" republics had met together on December 8 to make this decision on their own.
Nursultan Nazabayev had become the First Secretary of the Kazakh Communist Party in 1989, and Chairman of the Kazakh Supreme Soviet in early 1990. Later that year the post of President of Kazakhstan was established, at the Supreme Soviet had elected him to that position. He did not attend the Belavezha Accords, but was called by the attending leaders (Nazarbayev was something of a moderate and still on the fence between Gorbachev and Yeltsin - he had been shortlisted to become the new Soviet Prime Minister under Gorbachev under the new constitutional order that had been scuppered by the August 19-22, 1991 coup attempt). Nazarbayev did attend a meeting in Moscow on December 9, between Gorbachev and Yeltsin, which was incredibly turbulent (Gorbachev warned that dissolving the USSR would make the then-heating up Yugoslav wars a "joke by comparison"). Nazarbayev, as an unofficial spokesman for the Central Asian republics, stated he preferred some sort of continued union, ideally with joint control of nuclear weapons.
In any case, Nazarbayev, on his return to Kazakhstan, began to fast-track matters in the republic in order to shore up his control should a compromise union not be agreed-to. A Presidential election had already been held on December 1 (Nazarbayev ran unopposed and was elected with almost 99% of the vote), and on December 10 he took the oath of office as the first elected President, while the republic's legislature formally renamed the state from the Kazakh Soviet Socialist Republic to the Republic of Kazakhstan. The December 16 declaration of independence by the legislature (no one apparently thought it was worth submitting to a referendum) was therefore just a final step in a process initiated the week before. The December 16 date in particular seems to have been chosen as it was the fifth anniversary of the "Jeltoqsan" demonstrations in Alma-ata, which were protests against the republican leadership of the time (these helped to propel Nazarbayev to the top of the Party leadership in the republic afterwards), and Nazarbayev presided over a public commemoration of the protests and celebration of the declaration on the following day (December 17).