This whole mess occurred because politicians don’t understand the difference between what they want vs what is possible.
They wanted a Western style democracy, but what was possible was eliminating the threat to the West by defeating the Taliban and then leaving Afghanistan to be run by the Afghan people in the traditional way.
As soon as the politicians started talking about “nation building” in 2003, the war was lost