this is a bit half remembered from school 30 years ago, so very prepared to be corrected, but the two approaches both have issues of their own.
If you keep taking on national debt, you end up spending more and more money on servicing the debt, and the lines of cheap credit gradually run out - ending in a situation where you're paying more in interest than you are able to borrow from the international markets (when I was studying this, most of sub-Saharan Africa was in this trap IIRC)
On the other hand, if you keep printing money, you ultimately end up with hyper-inflation, and in a Germany 1930s / Zimbabwe 1990s situation where money becomes virtually worthless in any practical sense.