In Afghanistan, the EU engagement was too poor, and never a security and foreign policy priority for the EU compared to what the same European countries were contributing militarily through NATO.
When you get to the present day, the remaining options were all unattractive. The Biden administration, realistically, was faced with three scenarios. The first was to tear up Trump’s peace deal and renegotiate with the Taliban under more stringent conditions. The second was to carry on with the status quo given that alternatives to withdrawal would worsen the situation. This would require new strategies, fighting techniques and much better governance, an obvious challenge, but with strategic forbearance perhaps the future would offer better conditions. The final one (chosen) was to withdraw troops knowing the Taliban would return to power sooner rather than later.