onbekende, the idea of Nation Building was (and remains), sound. Yes, it's been bungled a few times. Greatly bungled. Especially when the US has decided that duly elected governments and their policies conflicted with their (US), vested economic interests. Look at their activities in the Caribbean. Especially those nations that chose a more socialist government, over bowing to the interests of powerful US economic syndicates.
I just finished reading a really good book about similar things you touched on "How to Hide and Empire", by Daniel Immerwahr.
Back to Afghanistan. The whole situation was never winnable, there was never going to be an outcome that the west would find acceptable. I remember a really good buddy of mine. He told me that when he joined up, his Dad got really angry at him. "Why did you join (the Army)? Are you stupid? You'll be sent to Afghanistan to die for nothing."
Or at least, that's what he told me.
Afghanistan has long been referred to as "The Grave Yard of Foreign Armies". Even Alexander the Great came to grief there.
On the same note, I work with people that were over there. They all say the same thing, the ANA and and ANP were completely unreliable. They were getting high on dope that they bought from the bloody Taliban.
By the same token, there were many that really appreciated and respected what was done. Look at the lines in Kabul, of people trying to get the hell out. We have an obligation to those people.
The Afghans have always viewed tribe as supreme.
During the Soviet's time in Afghanistan, there were those who sided with the Soviets, and those who didn't. Even though the national government was formally allied with the Soviets, and had asked for Soviet support.
It was all based on tribal loyalties. The Mujahideen of the Soviet years, became the Taliban of today. All based on who you tribal leader supported.
Never forget the Communist government of Afghanistan collapsed after the Soviets pulled out.
When tribal allegiance wins over national unity, there is no nation.
Let's be honest here. The current (legitimate), government of Afghanistan was never going to last the second the Coalition pulled out.
Let's even be more honest. We can blame, Bush, Obama, the Orange Demagogue, or Biden. However, they are beholden to the electorate.
How much longer do you think people were prepared to sacrifice their blood and treasure for a country, that some would have trouble pointing to on a map?
We are talking about a society that "literally, can't even" when their Skip order is five minutes late. Or their Amazon package won't arrive an hour after they ordered it. Or they can't get the latest smart phone the day it is released.
I think I got off on a rant there.
As much as I hate to say it, Afghanistan was unwinnable. We were dealing with fanatics, unbending in their misinterpretation of the Koran. They were more than willing to bide their time and wait us out.
And they did.