You should look at the CBO's reports on this. Most of the budget is spent maintaining Medicare/Medicaid and Social Security. The sleight of hand involved in the idea that the military budget is "most" of the spending is by calling large parts of the government's spending (but none of its military spending) "mandatory," and then slicing up the "discretionary" portion only, most of which is the military.
However, the discretionary part of the budget is less than half the size of the mandatory part of the budget. If the entire discretionary budget were cut to $0, between mandatory spending and interest, there would still be a government deficit.
That sleight-of-hand is how $900 billion of military spending becomes "most of the budget" when the full budget is $4.4 trillion.
That's because the SS/Medicare are not discretionary which means that those are basically predetermined and not set by Congress every year.
So when we talk about the "budget", what really matters as far as politicians are concerned, is the discretionary part, which they can control (and which in theory voters have some control over through their election of congressmen), and defense takes up at least half of that.
I am bad at addition, but I was going from 2023's numbers, which were indeed close to $6.4 trillion, not $4.4 trillion. Mandatory spending alone was $3.8 trillion.
However, the discretionary part of the budget is less than half the size of the mandatory part of the budget. If the entire discretionary budget were cut to $0, between mandatory spending and interest, there would still be a government deficit.
That sleight-of-hand is how $900 billion of military spending becomes "most of the budget" when the full budget is $4.4 trillion.