Why trading in dollar?

Given that gold is a better money than any fiat money, why is dollar used as money in global trade instead of gold? Are there any regulations or is it that you can not really buy anything without fiat money?

Legacy from when the dollar was as good as gold.

Your premise is wrong. Dollar is better.