Truth is, all US Administrations from Bush to Biden have been dismal failures in Afghanistan for the simple reason they have not addressed the fundamental reason the Afghan Army proved so useless – corruption!
Whilst I'm sure this is true, I watched an interesting documentary where the senior soldiers on the ground explained one of the major reasons it was so difficult to get a grip on corruption was the fact that none of the Afgan soldiers could read or write Illiteracy rates are some of the worst in the world. For example when the US army delivered fuel to the Afgans, to be divvied out between each platoon, each Afgan commander responsible wouldn't know if he'd been allocated 1000 gallons or 100 gallons. He'd have to take whoever delivered it's word for it. This made it really easy for the middle man to siphon off a load of fuel and sell it to the population (who were desperate to get their hands on it).
Soldiers simply being able to read chits and write receipts ensures each unit gets what it is allocated.