Banks don’t magic money out of thin air, they lend money to people and companies, which means they lose money, and gamble on getting more back from the debtor in payments with interest than they lent.
Banks cannot lend more money than they own, they can’t even lend out all the money they own due to fractional reserve regulation. If someone needs to withdraw money and the bank cannot give them their money due to having lent enough to hit the reserve threshold, they can borrow money from the central bank at their interest rate, which means they have to pay more back than they borrowed.
I don’t think you really understand finance