Creating a loan literally creates an offsetting deposit out of thin air. That’s how banks print money. They leverage their equity. Which is based on stress tests and the repurchase/dividend plans they strongly want to do! Plentiful money and credit.
A guy walks into a bank and asks for a loan. Gets one. Now the bank has a loan as an asset and the guy has a deposit at the same bank that he can spend. Money is created. Banks can do this as long as they have adequate equity and like the risk adj. rate on loan vs the interest on depo.