Invading Afghanistan was always a very bad idea...as was invading Iraq to get Saddam.
The American/Allied lives lost and maimed for life were not worth it.
There were other ways.
Coalition Of the Willing was a good idea, ... the folly of its actions was the big problem.
Missiles-firing attacks on evil...good.
Boots on the ground getting slaughtered...bad.