The conflict was won, by NATO, in 2014, wasn't it? I am not very good on dates but, as I understand it, for the last five or so (maybe more) years NATO; in this case that being 90% US and US contracters, has been the air support for the Afghan military, with very few NATO casualties, keeping the Taliban suppressed and out of urban areas. There was no reason for that support to be taken away ( Look at South Korea 20 yrs after you first kept troops there and then look at a further 20 yrs on for instance. If you had left there 20yr on it would be a poverty ridden hell hole still) but since the US intent was to leave at the 20yr mark great care was needed in the doing of.
As I have stated I think it wrong to leave; it may have been possible earlier via serious negotiations with many Afghan factions including Taliban, but not now and not as Biden did it.
So many mistakes and or wrong decisions have been made there, by many oft well meaning people ( As with all previous invasions) .... That is for another debate but because of , mis understanding Afghanistan, much misguided 'aid' going into the wrong pockets, rural Afghanistan is, in parts, in a far more fragile state now than it was 20yrs ago. Urban Afghanistan was thriving until last week and now the shutters are down. A death nell sounds over a country which did have hope. Hope because of a small NATO foot print in the country.
Blame Trump all you like - Though I think he was wrong, ill advised to think about leaving - undiplomatic in his first negotiations - he at least had a plan to get civillians out before soldiers. He did not plan to take all support, including maintenance/contract workers, away from the Afghan military - then your military - then, on second thoughts, civillians and f'ck your Allies.
Sure other NATO members should have been able to step into the US footprint ... but that too is for another debate.
Biden was not obliged to leave because Trump planned to and he tore Trump's plan up anyway ..... but we have been here before so .... no point in going over old ground.