You are correct that borrowing money increases the money supply. But when the loan is repaid, the money is destroyed. It's a net zero.
The federal deficit, however, is not being paid back, and so the increase in the money supply causes inflation.
The federal deficit, however, is not being paid back, and so the increase in the money supply causes inflation.
The same thing happens when you write a check. You create money by writing the check. When the check is cashed, the money is transferred, and the check is no longer valid.
Same with using a credit card.