Before 1944 all currencies were tied to Gold in a system known as the gold standard which means the value of currency is tied to Gold therefore countries can't print money more than their actual gold reserves eg $1 = 1 ounce of Gold $10 = 10 ounces of Gold
This simply means No gold no printing of money
But during World War II most European nations drained their gold to the point that there is no gold left to back their currency.
Then the United States came to their rescue. At that point, the United States had 70% of the world's supply of Gold which means they can print more dollars.
In 1944 about 44 countries agreed to tie their currency to the United States dollars instead of Gold. Which as a result automatically made the United States dollars a global currency.
But along the line the United States needed more liquidity than their reserves can carry due to many reasons including Vietnam and the cold war.
In 1971 the united states ditched the Gold standard which made the value of the united states dollar very unstable and now needed to be backed.
Saudi Arabia and their oil came into the picture and a secret deal was agreed upon between both nations with Saudi Arabia agreeing to sell Oil for only the United States dollar in exchange for Economy Security and the United States military protection. Then other Arab Oil nations followed suit and made the same agreement.
These deals help the Dollar to maintain Dominance as the Global Currency.