It was never ours to lose.
It was doing fine while the US occupied the country.
Then when it was turned back over to some Afghanis, things started to unravel.
After more than ten years of training by tbe US military, the Afghan military still sucked. Never hire the US military for training. It is painfully obvious that it sucks at training
By the time that the US contingent was down to a few thousand people, mostly confined to a few bases, the place was fully unraveled.
But it still belongs to the Afghan people. Just a different group than we preferred. Our preferred and supported group lost Afghanistan, but we didn't lose. .