Not really. When counting not just DoD spending but DoE nuclear weapons spending, NASA (now Space Force) and satellite spending, VA and veteran's benefits, interest on past military spending and so forth, military spending takes up a large chunk of the pie. It is only small if defined very, very narrowly (which is what they, and you, do).
They call it mandatory spending but this is a misnomer. When you pay into a pension system and pre-pay for insurance it’s expected that you receive the benefits you paid for. That it is government run is irrelevant to how it should be viewed. Social Security is not an expense of the government. It’s a government run pension system.
This is not at all how the accounting for Social Security, Medicare, and other mandatory spending programs work. Generally, Social Security beneficiaries receive more than they paid in (invariably they do with Medicare). And, obviously, everyone receiving Medicaid and SSDI do. I don't think this technical point about Social Security is going to salvage the argument that the US pays more in defense than anything else.
Apparently you don't understand how pensions work. Take a 401(k). Under normal circumstances what you take out of the 401(k) far exceeds what you put into it. This is what happens with investments generally speaking.
Saying, "Social Security beneficiaries receive more than they paid in..." indicates you don't know what you are talking about. And, believe it or not, Social Security does invest money.
And yes, it does salvage the argument. Defense spending (all of it not just DOD) is the largest expense of the government. This is expected when you are the hegemon.
Defense spending isn't even the majority of discretionary spending.
It's simply an enormous, vast economy, and 13% of a vast economy is a huge number, large enough to outspend the next several countries combined. That's all.
Regardless, social security is funded totally separately from the rest of the budget, with a dedicated tax, and does not contribute to the deficit. It’s typically excluded from budget discussions, for that reason.
You could change the law to axe social security, keep its highly-regressive tax, and instead use that to pay for other stuff—but lots of things are possible with a change in the law, and that’s not possible now without such a change. That’s not something that can happen as an ordinary part of the budgeting process.
I'm not saying I like everything about federal spending (or even defense spending), just that the argument that we spend most of our money on defense (or even a plurality of it) is false.
For this reason it’s pretty unusual to see an analysis of the US budget aimed at policy nerds that includes Social Security. Almost all serious discussion about it excludes that.
You tend to only see it included when the full total of money disbursed by the government from any pot and for any purpose is expressly relevant (it’s usually not) or in writing that is not aimed at policy nerds, but at everyday voters (to convince them whatever batshit crazy spending we’re doing in the author’s preferred non-social-spending item isn’t bad after all, usually)