This was stated way back on March 17.
"The May 1 timetable is part of an agreement the Trump administration forged with the Taliban in February 2020. Under that deal, the U.S. agreed to withdraw all its forces; in exchange, the Taliban promised to sever its ties with al-Qaeda and end its attacks on American forces. The Trump administration began a drawdown of U.S. forces, and about 2,500 U.S. troops remain in Afghanistan now."
The fall of Afghanistan to the Taliban was inevitable whether we followed Trump's withdrawal plan or Biden's. Does anyone trust what the Taliban says? The same scenario will play out in Iraq.