This is incorrect.
When the government runs a deficit by "printing money", it steals from all of us by making our money in savings, to be worth less than it was when we put it into the bank account.
It is NOT good to run a deficit at all.
The graph showed what LOOKED like prosperity when the government runs a deficit, but that is only because the repayment is deferred. It is not until later. So the cost and poverty is just moved down the road, off the edge of the graph, so the graph is deliberately deceptive.
Government deficits are horrendous, and should only be allowed is there is an emergency, like a war or depression.