In the same general parameters of your critique on this post, if the US had actually treated Afghanistan like an Imperial Colony I actually think the outcome would've been much more palatable to all involved. Treat the country like a colony, and make them pay taxes for administering their security, forcibly educate (meaning: re-educate) the populous, hand off administration of the government in pieces over about 50 years as the civil infrastructure and information coordination systems mature. Alas, this would've been maybe 10x more expensive than what we already paid, and for reasons that should be obvious the model we used in Japan and Germany really doesn't quite fit in that place.
The impact on USA was minor to non existent. Impact of this war on Russia is massive.
https://archive.org/details/WarIsARacket
(yes, yes, this is a "/s" for those who can't figure it out.)
Democracies are great at sustaining long aggressive wars despite it being a really stupid thing to do (the US destroyed a lot of its own wealth & the opportunity costs were jaw dropping). There was never really a question of the US army being unable to achieve military objectives.
[0] https://en.wikipedia.org/wiki/War_in_Afghanistan_(2001-2021)