In the twentieth century the dollar became the global reserve currency when in 1944 the world’s developed countries met at Bretton Woods, New Hampshire and pegged the exchange rate of all their currencies to the U.S. dollar. Prior to that, most countries were on the gold standard which meant that, upon demand, they would redeem their paper currency for gold and kept enough gold in reserves to do so.
Eventually the United States abandoned the gold standard, when Richard Nixon completely untethered the value of the dollar to gold, but by then the U.S. had the most robust economy of any country in the world, so it remained the dominant reserve currency. Is there a country in the world where you cannot exchange dollars for the local currency?