if Japan is importing many goods and services,
they need to pay them in USD
Yes, and for this purpose, the Dollar is among the "stuff" the US produces: A currency accepted in many places.
Most of the money is created by commercial banks
Say there is a new bank which has no central bank money, no deposits, nothing. First customer walks in and gets a credit of $100. Now the customer wants to pay these $100 to someone who uses a different bank. What happens?