I am not looking to limit conversation but /u/white_light-king answered a similar question here.
The change of the US Dollar from the gold-standard to a free float is quite a complex question since it has its origins all the way back during the economic instability of the 1930s. Initially, I did not really want to write an answer for this since it always stirs a macroeconomics debate which in my opinion is not under the purview of this sub even if it is historically related since a lot the debate centres around economic ideas and theory instead of historical events and such. So a little disclaimer going forward, while some of these ideas may or may not be economically sound or in vogue anymore, I would like to emphasize that the emphasis on historical elements and less on the economics which at that time was heavily influenced by immediate Keynesian ideas.
The system that establishes the USD as the trading currency of the world was the Bretton Woods System (BWS) formed after WWII. The system was primarily created to improve economic stability with fix exchanged rates so no country could manipulate and devalue their currency at will to flood another country with cheap export. For those interested in the economic principle behind this, you can look up the Marshall-Learner condition. This was in reaction to the economic turmoil of the 1930s which already at that point was rationalized to be one of the reasons leading to WWII. Besides that, the US was in the process of rebuilding Western Europe and they required trading partners if the US was going to successfully sustain capitalism in their allies. There is definitely an argument to made on political grounds as to why the US was invested into forming the BWS since it tied directly into their Cold War considerations of maintaining a sphere of influence and ideological competition with the Soviet Union. However, the more practical reason was that by this point the US control a majority of the world’s gold reserves (something around 80% if my memory is correct) as it received gold as payment for arms during the war. It was effectively impossible for other countries to adopt the gold standard since they simply would not have enough gold to back the amount of currency required for their economy to function. To sidetrack a bit, this is the fundamental reason why it is not practical to use the gold standard today, there is simply not enough bullion to back the amount of currency required for the economy to function on this scale. There are further economic arguments made against it and in favour of a fiat currency (which is what gold is anyway, something that has value because we decide it did and it was scarce enough). So the only option left that maintained a high degree of economic stability was a fixed exchange rate pegged to the USD.
The BWS, in short, pegged other currencies to the USD, made the USD the currency of international commerce since all countries would trade with it and pegged the USD to gold. This created a great deal of stability since the USD was used for trade and was fixed in the exchange rate to other currencies, it was the medium to sustain global trade at the time. However, the additional component of the BWS was that to incentivise countries to use USD, the USD was convertible for gold at a rate of $1USD/0.35oz with the US. This meant that countries that wanted their gold reserves back would be able to obtain it by trading, accumulating USD and then exchanging it. The next problem with the system is known as the Triffin Dilemma where a country’s currency being both an international reserve/trade currency limits their national monetary policy. Monetary policy is effectively controlling the supply of currency which affects inflation and exchange rates. However, any currency that is being used as an international trade currency needs to be supplied in large quantities which effectively devalues the USD since supply is increasing. This is compounded by being pegged to the gold standard since the US was haemorrhaging gold due to the BWS and thus did not have enough gold to peg to the amount of USD in circulation. With a large portion of its currency being overseas as it was used globally as a reserve and trade, it made it even harder for the US to regulate the amount of USD that was available.
Thus, this leads to President Nixon in 1971 unilaterally cancelling the convertibility of USD to gold in the events known as the Nixon Shock. It was only two years later in 1973 that the BWS would truly end with fixed exchanged rates being abandoned for a floating exchange like we see today and the USD being taken off the gold-standard. To put it simply, there was just not enough gold to keep the enormous amounts of USD pegged to it which was made worse by the ability to exchange the USD for gold. There is simply not enough gold in the world to sustain the gold standard given the size of the global economy. Money is ultimately another tool to facilitate economic growth, goods and services are still what has real value and money be it fiat or gold standard is still just a placeholder for that. Therefore, there needs to be enough money to facilitate functional commerce and the 1 for 1 backing in gold limits that to an. There is plenty more to be said on the limitations the gold standard but I think that strays too far into the realm of pure economics without any historical discussion. Lastly, while economic history emphasises the use of economic concepts it is still grounded in the historical discipline by virtue of applying said concepts to understand a historical period while retaining its emphasis on historical methodology. Thus, it will normally not be as rigorous as pure economics and it does not aim to be in most cases.