The explicit architecture of the petrodollar system is that the US will protect international shipping, and in return all petroleum contracts will be priced and executed in dollars. This makes the USD the international reserve currency, and every country participating in international trade needs to hold USD.
How can they put those USD to work? By buying up safe US government debt and other financial instruments.
The US has been rewarded with near unlimited borrowing ability assuming it remained the most stable, powerful, and trusted partner. We could use that to fund practically any investment we want.