It's also important to remember that this doesn't appear to have been the Taliban. ISIS-K has no qualms about attacking the Taliban or US troops - they are extreme extremists.
What We Know About ISIS-K, The Group Behind The Kabul Attacks
There are terrorist attacks in Afghanistan all the time, it's notable and heartwrenching that today was the first time since the Trump administration's deal back in February 2020 that US troops died. But it was not a peaceful place before we started the withdrawal process. After the deal, the Taliban switched over to assassinations and attacks on the Afghan army. This was a violation of the deal, but the Trump administration didn't hold them accountable when they could have - they just moved along in handing the country over. US citizens were preoccupied with the pandemic, and the news never really covered Afghanistan, so many don't know about the deal.
This is a nasty mess, because of course we can't trust the Taliban, but we are in the position of working with them to get ourselves out. They are being attacked by ISIS-K, just like we are. What happens when we leave? Nonstop chaos between different terrorist groups? I guess, but we can't stay now, even though plenty would love to keep making money off of it.
Taliban are back - what next for Afghanistan?