I may be wrong, but it's not money that's the problem; there's plenty of money. (I would also point out the NASA budget is a miniscule spec of dust compared to the total budget.)
It seems to me the problem is organization and politics - actually doing the right things to address these problems.
It's like, say, Microsoft. They can't run a successful project to save their lives. This is an organizational and cultural problem. Large organization, lots of politics, enough money that success or failure is not critical to survival.
> Governments should have been able to do that up until now. Instead the government has been shipping money overseas and spending it on foreigners for far too long.
In what ways?
Art and science funding is listed before funding the military and law making as a responsibility of congress. That was written in that order intentionally.
https://thehill.com/newsletters/morning-report/5296716-house...
https://apnews.com/article/congress-tax-cuts-republicans-med...
Programs like SNAP benefits (a.k.a. food stamps) have always been top of the list of what Republicans want to cut.