You should take a moment to read up on the topic.
https://en.m.wikipedia.org/wiki/2020%E2%80%932021_U.S._troop_withdrawal_from_Afghanistan
Trump signed the original agreement with the Taliban. Biden delayed the deal from May until September. Trump had a year to handle sorting the agreement he made.
Most of us understand both presidents failed in it's execution. It's important you know that Trump lit a short fuse and walked away.
"We must therefore claim, in the name of tolerance, the right not to tolerate intolerance"
Karl Popper