If you include things directly related to, but not classified as defense spending, like veterans benefits, VA, and the cost of foreign bases; the military is about ~20% of the total US budget.

https://www.govinfo.gov/content/pkg/BUDGET-2025-PER/pdf/BUDG...