Taliban won for one reason..... we did not use the weaponry we have to defeat them. That is all.
We did not win, true.
We tried to section off, parcel out combatants. (The people of Texas don’t act like the people of Massachusetts, so we hit them.)
We unoficially declared war on a theocracy that does not recognize any national boundaries, other than what has been conquered, or not.
We tried money, trade, expressions of freedom, to a mindset that has never conceptualized what freedom is.
We reared back from winning their hearts and minds or burning their village down.
Historically, govermental armies have never actually won in wars against tribal factions. They gave up, and settled for some fashion of a treaty. America cannot fathom a path of total extinction as an answer.