Afghanistan is both landlocked and underdeveloped as a society. US was trying to rebuild Afghanistan in line with first world principles such as democracy and having a conventional military force. This was never going to work and Americans wasted billions of dollars on this stupid plan. It is not possible to transform Afghanistan into a democratic society.
US could simply hand over Afghanistan to Northern Alliance and provide necessary funds to it for governance and create an army instead. Point is to let the LOCALS decide HOW to rule and rebuild the country. And funds should be provided according to the needs of the people in the region. You do not go around showering dollars on warlords and expect good governance from them with this approach - too much wealth corrupts people instead.
Put your energy on HOW to deal with terrorists in the region instead.
US had GOOD strategy for its
Operation Inherent Resolve in Iraq and Syria, however. This is COIN masterpiece.