Not necessarily, though $5 trillion all at once would probably not be a good idea. The money supply is a bit tricky in these days when most transactions (especially large ones) don't actually use cash. Issuing new debt in a sense already
is like printing money, because bonds can be used as cash-like instruments in many situations. That's particularly true of U.S. Treasuries, because they're safe and liquid enough that they can be used as quasi-cash, especially for large transactions, e.g. settling part of a debt by transferring title to Treasuries. It's a bit of an open question to what extent just printing $500b would be different from issuing $500b in new bonds, and heavily interacts with the background situation (e.g. prevailing interest rates, demand for Treasuries, liquidity situation).
There are a decent number of economists who think that the U.S. a year or two ago should've fought deflation by just printing $500b or $1 trillion or something, rather than pursuing the quantitative easing (QE) scheme, which uses financial trickery to get some of the same effect without officially printing money. The just-print-money option may have actually worked better, been more transparent, and had the added bonus of reducing our national debt.