Trump betrayed the Afghan government in Doha. Agreeing to withdraw US forces meant all the Taliban needed to do was to wait until they were gone. Then when US withdrew air support for ANA, the ability of the ANA to win against the Taliban was severely impaired. It did not help that soldiers were not being paid, reportedly due to their pay being taken corruptly before it reached them.
Trump proved to be a dishonest ignoramus. Easy for the following president to do much better but somehow Biden has managed to show complete incompetence in handling the withdrawal from Afghanistan he inherited from his predecessor.
Trump did nothing wrong. No nation should fight a war that doesn't give any gain back to the nation. It is realpolitik. It is the war hawks that never wanted to leave Afghanistan as they were minting money. How many security agencies made billions in last 2 decades? Trump knew that USA needed to get the hell out of there.
Fact is, the corruption in Afghanistan might have been aided by USA and CIA, but it was done by Afghans themselves. USA did provide the afghan Army with superior weapon systems and training and every bloody thing that a 3.5 hundred thousand strong force needs to subdue a lesser equipped 75thousand strong enemy. Yet, the Afghans who should have known that the day USA would leave would come one day and still did not prepare. You cannot expect a foreign power to defend you forever when you squander away your own opportunities.
But, truth is Trump did not abandon Afghanistan and actually pushed back his withdrawal plans several times and sent the war machines several times on talibs in warning for their bad behaviour. What did Biden do? Biden simply was absent!
Nobody in his right mind would blame US for leaving. But everyone is speaking about how they left!
USA should have left Afghanistan 15 years back. If it did so, the Talibs would already have been defeated by an organic opposition that would have taken shape. Instead a complacent leadership with corrupt and cowards at every corner took power in Kabul that angered common Afghans so much that they almost welcomed Talibs in many places till talibs showed their true face.