We had an opportunity to get out, make a treaty with the Taliban in the first year after we invaded.
IMO it was legit to go in, because al-Qaida was being hosted there, and it was important to put a stop to any more 9/11s - but anything beyond that, any attempt at foisting our culture on them was very much not.
Agreed on Iraq (reasons to go there were pretty much lies). I put that on Cheney.
And as far as Vietnam. It was a farmers' revolt against the rich landlords - we were on the wrong damn side. Instead, we were supporting a corrupt upper class and dictator. Eisenhower was pretty clear on not getting involved in colonial disputes, but somehow the French (using our fear of creeping worldwide communism) sucked up in.