The 2312 number is contentious. It doesn't include contractors or combat related suicides (which are almost 10 times the number of casualties), but for the sake of argument we'll go with 2312. I could be convinced that those numbers of casualties are worth it, if that was it. But in addition to those deaths, do you also think it was worth the $2,260,000,000,000 dollars and twenty lost years of military modernization in reference to actual peer power competitors i.e. China/Russia?
https://watson.brown.edu/costsofwar/costs/human/military/killed
https://www.politifact.com/factchecks/2016/oct/27/donald-trump/did-us-spend-6-trillion-middle-east-wars/
The PLA alone has already caught up, in unclassified reports, in Ships, Missiles, and Air Defenses, among more. In many Rand studies, we have lost significant ground in dozens of areas that we had a significant advantage in only 20 years ago.
https://www.rand.org/paf/projects/us-china-scorecard.html
https://www.rand.org/content/dam/rand/pubs/research_briefs/RB9800/RB9858z1/RAND_RB9858z1.pdf
For reference, with $2.26T, we could have bought an entire new additional fighter platform fleet analogous to the F-35 from cradle to grave, lasting until 2070 (including development/test/operations/sustainment).
https://www.stripes.com/theaters/us/2021-06-01/The-F-35-Joint-Strike-Fighter-the-costliest-weapon-system-in-US-military-history-now-faces-pushback-in-Congress-1618847.html
You could have bought over 17 entire carrier battle groups + air wings + personnel and operated them literally every day for 50 years.
https://apps.dtic.mil/sti/pdfs/ADA575866.pdf
You could have modernized to actually fight against the IADS, the J-20, chinese satellites, the cyber threats, anti-ship missiles, etc. We could have technologies that are relevant to peer competition. We could have replaced the E-3, the A-10, the B-52, the F-16, the EC-130, the RC-135, the AC-130, the MQ-9, the B-1, etc. The army could have upgraded the patriot. The marines and army could have developed modernized fires systems.
You could have modernized our outdated nuclear triad. We could have developed hypersonics on parity with our competitors.
https://jamestown.org/program/chinas-hypersonic-missiles-methods-and-motives/
But instead we decided to try to wipe out an ideology that killed 3000 American civilians. And it didn't just stop with Afghanistan - it brought us to Iraq and Syria. I have to admit, some of those sorties seemed deeply satisfying to me, at first. It felt like I was making a difference. But every year that I was there, I realized more and more that we were getting nothing done. One poignant example was fencing in to fight a faction that, only a few years ago, I was defending. That wasn't just a single event, either. If that's not an operational/strategic miscalculation, I don't know what is.
I can agree with some folks on here that want to point out that we were successful tactically and operationally. Some really smart tacticians/operations commanders did a good job of fighting a conventional war against an unconventional combatant. But to say we had any clear strategic or grand strategy victories in the middle east is a huge stretch. FFS, we let Russia invade Crimea, and we pretended like it didn't happen.
In the end in the middle east, we didn't just give away the 7000+ uniformed deaths, the 8000+ contractor deaths, and the 30000+ military suicides after coming back home. We gave away an unfathomable amount of money, our advantage in the future fight, and a huge portion of our strategic influence.
https://watson.brown.edu/costsofwar/costs/human/military/killed