He released 5000 Taliban prisoners and announced that the US was leaving the country before the conditions of the deal were met. His tweets that he was reducing troop levels removed any incentive for the Taliban to fulfill their end of the bargain.
Trump relentlessly, cluelessly sabotaged peace talks, proclaiming his determination to pull out, and unexpectedly announcing troop reductions. His tweets became a major obstacle to negotiations, as he declared he was withdrawing US forces, the only leverage of US negotiators, without obtaining any real concessions from the Taliban.
In February 2020, Trump unveiled an agreement with the Taliban. The deal was an utter embarrassment, one of the worst ever negotiated by an American president. Under its terms, the United States not only agreed to withdraw by May 2021, it also committed itself to obtaining the release of 5,000 Taliban prisoners, and another thousand in subsequent months, fortifying the Taliban's fighting force. The US also promised to help lift all international sanctions against the Taliban.
In exchange, the Taliban promised not to attack Americans until they left, and agreed to start talks with the Afghan government.
The supposed negotiations with Afghan representatives went nowhere, but the Americans started leaving. Trump kept tweeting he was pulling out the troops, removing any incentive for the Taliban to compromise.
https://edition.cnn.com/2021/08/17/opinions/buck-stops-with-biden-but-trump-role-in-afghanistan-a-doozy-ghitis/index.html