We helped them fight for 20 years. The real problem is that we couldn’t stop Pakistan from sheltering the Taliban and keeping it alive.
We didn’t transfer the logistics of feeding, paying, and supplying their military, just left it to them to work it out on the fly. We left huge supply depots unguarded, having snuck out without informing the Afghani government while the Taliban took what they wanted. We set them up with an integrated tech-based military, and then took away the ability to use it - and effectively told the Taliban we weren’t going to help.