Afghanistan is a wash, nobody gets to take credit for ending that. Trump entered into the surrender agreement, but delayed the execution of the agreement past the end of his term, so if he doesn't take the blame for the fallout he doesn't get credit for ending it either. Meanwhile Obama surged troops while he was in office, sure, but then tried to steeply draw down and was blocked by republicans[1]. They also blocked his effort to close the human rights embarrassment at Guantanamo[2]. This is basically an 'everyone sucks here' situation, at best.
Trump, denying they lost the election, refused to support any transfer of power or awareness to the incoming administration as traditionally happens. This combined with the agreement taking effect very shortly after the new term enhanced the scale of the damage, particularly with the new administration's cabinet bootstrapping during the same period.
Regardless, who is there when they withdrew is not the same as who made the plan and started the withdrawal. The Doha Agreement was drafted and signed under Trump. Biden didnt renege on the agreement and executed it.
We have no idea if he would have drafted such an agreement but his track record in that regard isnt good. Obama and Biden increased troops as another commenter noted.
The reality is that there was no path to a good exit from Afganistan, and we should condemn Bush for starting it, condemn Obama for doubling down, condemn Trump for not pulling out earlier, and same for Biden.
And ended by a Republican