I think that saying it's for nothing is a little...I dunno. Much? There are people who will live because the Taliban was gone for 20 years. People who felt different freedoms than normal. But those things were too few, too far, and too weak, and many of those people will soon be extinguished by the Taliban. I don't think, despite those changes, the course of Afghanistan has been materially changed in the positive, and yeah, so on the broad scale, this was a futile exercise.
The fact is that the soldiers trained by ISAF did not do what they were supposed to do. Surely, many defected to the Taliban. Many more lay down their arms. More were a mirage, paper soldiers created to justify expenses. All ISAF forces participated in the mirage, creating an army that functionally did not exist, with no professionalism or desire to fight, merely to get paid. And a few months ago, the money stopped, so what little professionalism used to exist vanished. Especially when the Taliban showed up and paid those guys.
There are a ton of NATO soldiers who died and now those people have to reckon with the legacy of a failed war, like the Vietnam veterans before them. They died and were wounded and bear great mental scars...for very little, if anything.