How Do Governments Transfer Money to Each Other?

If two individuals or companies want to transfer money from one to the other, they typically rely on their having accounts in private banks, and they authorize the banks to transfer the money from one account to the other. How does it work when it’s two governments transferring billions of dollars between each other? Do they have accounts in private banks with that much money? Or do they have their own government banks with only the government account? And if so, how does the money get into that account to begin with? Is it from transfers from accounts in private banks for tax withholding/checks and bond purchases? Or can the government just declare the money to be there and rely on full faith and credit? In general, how would any non-government entity know how much money would exist in a government account at a government bank?

[One of my kids asked me this question and I didn’t know the answer. :)]

I’m on my phone so can’t search easily, but I seem to recall there was a thread in this point with the past few months

Northern Piper might be thinking of this thread from last August: “How do countries pay each other sums of money?” I’ll just repeat my answer from that thread:
The United States has a bank.

The bank is called the Federal Reserve.

The US Treasury has an account at this bank. When we pay our taxes, the numbers in this account go up. When the government spends money, the numbers in this account go down.

Other countries have their own banks, too. These are called central banks. For example, the central bank of the Republic of China (Taiwan) is, in English, called the Central Bank of the Republic of China (Taiwan).

The central banks of nations have accounts with each other. Naturally. If Taiwan wants to pay the United States government for something, they can use money in their account. They can tell the Fed to take the money out of their account, in order to give the money to the US government’s account. If they don’t have enough US dollars immediately to hand, they might have to arrange a series of transactions with various dollar-holding institutions around the world. Those banks can transfer money in their Fed accounts to the Bank of Taiwan’s Fed account, while the Bank of Taiwan in exchange transfers some other asset of equivalent value, perhaps their own New Taiwan Dollar. But they’re not likely to be short on American cash. It’s normal for central banks around the world to have extensive US dollar reserves.

The details could be expanded upon at tedious length, but the basics are pretty simple. Governments transfer money using government banks.

Mostly government banks, but sometimes regular banks. For a long time the Central Bank of Ireland was the issuer of Irish currency, but the Irish government conducted its banking business with the Bank of Ireland, a listed company. The Bank of England was a private company owned by shareholders until it was nationalised in 1946.