the key thing to note is that after the failure of the bretton woods international monetary management system in which
currencies were pegged to the US dollar and it in turn was backed by gold.
At the end of WWII the US had 80% of the worlds gold reserves so this worked out well at the time (along with oil production, manufacturing and investment capital reserves) and needed to expand trade.
The reason it was backed by gold was that to avoid the experience of the 30s when nations devalued currencies and imposed high tariffs to be competitive.
However by the late 60s there gold outflows from the US increased and there was increased debt and inflation due to the cost of the Vietnam war so Nixon unilaterally canceled the Bretton woods system and stopped the convertibility of the US $ to gold.
But around the same time the US got the Saudis to agree to trade oil in US $..