“failed to defeat a bunch of goat herders”
You can’t really “defeat” an insurgency that has the general support of the local population, as the Russians themselves found out in Afghanistan and as they will find out again if they do get their wish and manage to defeat Ukraine.
You also can't do it without any leadership or will. Karzai was a joke, Biden a bigger joke.
In the case of Ukraine, Pooty seems to have the will, and appears to be trying to drive out most of the population. This was successful in Syria, but in Ukraine, we (well, they) are almost through winter and wrecking the grid, etc., doesn't seem to have had the desired effect. Not that many Ukrainians, especially potential fighters, have fled in the last few months.
“You can’t really ‘defeat’ an insurgency that has the general support of the local population...”
An ancient maxim. And it has stood the test of time. The only way to prevail over a popular insurgency is via total extermination. And, even at that, it would not be a defeat. Defeat comes when one side quits or surrenders and subjects itself to the tender mercies of its foe. Dying in defense of what you hold dear is just that...dying (and the death is an honorable one).
Another maxim (paraphrased): The true warrior can be killed, but never defeated.