When a bank makes a loan, they create a loan and a deposit from nothing, they don't need deposits to create loans.
Banks are subject to capital requirements, and are concerned about profitability and loan losses, so they don't make an unlimited number of loans.
This might seem like semantics but someone who believes reserve requirements and deposits are the limits on lending would find it tough to explain why banks aren't lending huge amounts after the reserve requirement in the US was cut to zero.
What's taught in undergrad economics courses is incorrect. Fractional reserve banking doesn't really exist anymore. Banks don't lend out the deposits they recieve, they create new ones 'out of thin air'.
Arguably the most important constraint on a bank's ability to create new loans (and hence new deposits) is its core tier one capital ratio: that is, its total liabilities divided by its shareholders' equity.