Money is very much like water in a way with how our current economy functions. Sitting still, it does nothing. It isn't being used, nothing is being traded, more and more people start to run low on it and those who have any left spend less of it because they too don't want to run out and then be left with nothing like those poor sods who have run out of bits of paper or digital entries on a computer. And of course, without those bits of paper or digital notes on some super special computer, we can't possibly DO anything. It would be totally illogical to do things like just give someone land and tools and seeds and help them grow food. Or just help someone repair their home. Of course not, that would be beyond silly and stupid if they can't provide you with an ever increasing amount of magical beans.
But if you have a large enough group, such as a government, forcing projects and spending that ensure a large number of people with little money still get some and can still keep buying things, well then that money cycles.
Just like there isn't an infinite amount of water in the sky to fall down as rain, collect in your well, which you then drink, pass through your body, and then flush away from a toilet... Well, governments don't have an infinite amount of money that they can just keep spending. Instead, they spend some and focus on building up speed and energy in the economy. They get some of it back which they can fire into the economy again and get the wheel turning faster and faster. The more the wheel turns, the more a government can collect to fire back into it and spin it even faster.
And thanks to inflation, debt isn't really as serious a problem as some make it out to be, assuming things work well. "You can't borrow your way out of debt!" is true for a household, but a household doesn't collect a bit of money off nearly every last transaction that goes on in the country. Debt can keep growing and a country can stay well ahead of it, if the economic growth stays ahead of the debt growth. The amount of debt isn't what one needs to worry about, even if it grows into the quadrillions of dollars. The ratio of debt is the critical factor.
Of course, humanity is going to have to sit down and reevaluate how it conducts economics, because our current system has become far too fragile and chaotic to have much hope of surviving the next hundred years of automation and AI advancement without an exceptionally high risk of some nasty bloodshed and revolution. And I for one LIKE big shiny metal robots that do cool things, and would prefer to not see them smashed just so that humans can go back to having jobs and thinking they're better off than serfs and medieval peasants were.