There is no "Afghanistan" just like there is no "Iraq."
These are artificial nation states composed of a variety of ethnic groups that are more loyal to their 'tribe" than some government with little legitimacy.
The Taliban are going to have fun, what we did accomplish was to bring most of the Afghani people out of the dark ages, with the internet, smart phones, etc., a large group have access to the world, and it's hard to put the genie back into the bottle and go back to a medieval fundamental religious state.
Ignore the posturing, right now both Iran (facing a radical Sunni country on its Eastern border) and Pakistan (facing a Pushtan movement on their border potentially aiding their Pushtan minority and their local Taliban) are freaked out - both wanted the Americans to stay so they could play both sides. Now they face the unknown. The Chinese face a militant Islamic government close to their Eastern provinces.
The question is why were all those Americans still in country? Did the State Department put PR (protecting the Afghan government by not issuing "get out of town" orders) over the safety of Americans?
However, unless the Taliban are stupid, it's in their best interest to get the Americans (and probably their allies) out of the country so they can take over without world attention.