Actually, vastly more Afghan soldiers died in fighting against the Taliban that US soldiers.
Look it up.
66,000 Afghan soldiers were killed fighting the Taliban
Versus
Only 2,400 US soldiers killed in the war.
By contrast 0 US military deaths and the Ukrainians are holding their own.
Much unlike Afghanistan.