> A bank can make an infinite amount of loans. They are not constrained by anything.
They are constrained by capital and/or reserve requirements
> The way a loan works is: they make a loan to someone and then "just in time", they borrow the money from the Fed to cover that loan.
Nope. Banks can borrow against their government securities from Central Banks by "rediscounting" them during discount windows, should they need extra liquidity. Note that this is not the preferred method since Central Banks usually charges a premium. These are secured loans.
But loans aren't typically available immediately - they take time to clear. It doesn't seem unreasonable to me that they'd bundle the day's loans (or maybe a few hours at a very large bank) to limit the number of transactions they'd have to make.
The money that gets borrowed from the Fed is used to settle balances between banks. When a bank originates a loan, they just add a number to an account. The money doesn't come from anywhere. This works mainly because most money transfers are electronic.
tl;dr yes, banks create money out of thin air. It's been this way for decades.
The answer in the US is simple: the Fed.
A bank can make an infinite amount of loans. They are not constrained by anything.
The only "limitation" they have is the future default rate of the people who accept loans from them.
The way a loan works is: they make a loan to someone and then "just in time", they borrow the money from the Fed to cover that loan.
Now, many banks take customer deposits. I think there are 2 reasons they do that:
1. Deposits may be less expensive than borrowing from the Fed.
2. Account holders are warm leads for future loans.
But in principle, a bank doesn't have to take any deposits.