and what we got for those losses was what Grandpa would call gurnisht (read: nothing at all.)
It's hard to tell when a deterrent is working, because nothing happens.
Maybe our mistake was in not staying in Afghanistan until a generation of men had been reared by a generation of women who had gone to school. America is really bad at the long game. I wonder if divine-right monarchy survived for so long because time moved so slowly before the industrial revolution. It took a generation to do anything and several generations to do some things. Remember the Thirty Years War and the Hundred Years War?
Thanks to modern technology, nowhere is too remote to cause trouble from. The rich countries really need there to be no poor countries, because the whole world is one neighborhood now.
The decision to leave Afghanistan was not Biden's; it was Trump's. There is no reason to believe it could have been done in an orderly way if the Taliban didn't want it to be done in an orderly way. Trump's actions made the debacle unavoidable. Biden probably knew this but couldn't say it, because that would have been seen as a green light to the Taliban. So Biden had to pretend that the withdrawal would be doable, whether or not it was, and whether or not he knew how it would go.
Could it have been managed better? Many people say yes, but few say how. (The Vietnam example suggests that losers cannot leave gracefully as much as it says that that they should leave gracefully.) There were talks between Trump and the Taliban, and there was a "deal" between Trump and the Taliban, and the Taliban and Trump ignored that deal except the parts that would make it look like Trump was doing something right. But he wasn't.