Trump's deal with the Taliban was signed back in Feb. 2020.
The deal’s conditional schedule for the withdrawal of the remaining American troops specified that in the first phase, nearly 5,000 are to leave Afghanistan in 135 days, The withdrawal of the rest, to be completed within 14 months of the signing, will depend on the Taliban keeping its end of the bargain, - but the election & Biden intervened.
Trump personally told the Leader (whose name I forget) that if there was any infringement &/or any US casualty during his orderly withdrawal schedule, he would bomb his village!