It's not even a remotely comparable situation. The Taliban was totally underground until the United States left. The miscalculation there was thinking people of Afghanistan wanted to be ruled by a proxy government of the United States in the first place. The Taliban won because the majority of men didn't want to oppose the Taliban. There wasn't even a fight.