The bank is happy to loan, as long as you can show you have security, and promise to repay with interest. That is a good question. Banknotes, when they are printed, are considered the property of the Central Bank. They are not given to the State to spend, but are brought into circulation against a corresponding debt. When you go to your bank asking for money, the loan you get is created right there in your bank.
Banks only have to have a small percentage of their loaned-out money actually available.
The rest can be paid just by moving some figures from one account to another. That means, if a bank collects 100.000 in deposits, it could keep 10.000 for liquid cash, put 90.000 into deposit with the central bank, and it is then allowed to create 900.000 of fresh money just by writing the figures on someone's accounts. In the case of the government needing money to spend, the procedure is slightly different, but the result is the same. The government has to issue papers that promise interest and repayment. Now this is interesting.