Yes, you are right. Bank create money out of thin air.
How do they do it?

What does a bank does?
A bank accept it deposits from a customer and hold it money, if all banks hold it money and do nothing about it, there won’t be any profit.
What normally a bank do it to loans majority of it money out. They need to keep some as reserves for customers who come back for withdrawal.
If everyone goes to the bank to withdraw all our money out and the bank run out of money, it would be a default or we call it a bank run.
Every countries have there policy for banks minimum amount of deposits that they must hold by law.
We call this “Required Reserves”. It is 10% of USA and the remaining will be “excess reserves” where they loan it out.

Example:

Imagine “customer A” make a initial deposit of $100
The bank holds 10% required reserves and loan out the excess reserves.
Meaning they keep $10 and loan out $90.

Now, “Customer B” borrow $90 from the same bank again.
See what happen here?

Customer A had a $100 that is deposit with the bank.
Customer B also had a $90 cash on his hand loan from the bank.

Customer B will spend the $90 which will eventually end up in another bank as a deposit again and that bank will have the “Required Reserves”& “excess reserves” exercise to create money out of thin air.

This will go on and on again and again.

This will turn out that the initial deposit of $100 creates $900 of new money.

This is the whole idea of factional reserve banking all around the world.