NASA is 0.35% of the federal budget.
In the ENTIRE HISTORY of NASA it has cost about the same as just the last 2 years of the DoD budget
NASA isn't why the US doesn't have universal healthcare, or a social safety net. The US doesn't have those things because politicians with the power to provide them choose specifically not to (with varying levels of support from voters). Enthusiasm for human spaceflight doesn't drive that choice.