The Anarchists lost to the pro-Nazis government, idk why everyone tries to use that as an example. Really depressing to think about.
There's a really fantastic 6-part documentary that goes over the conflict in great detail, but to give the short version:
It failed for a multitude of reasons, but when I did my own deep dive on this, Anarchism itself wasn't one of those reasons. I found that the specific time it took place, as well as the previous industrial capacity of Spain itself, were likely two of the biggest contributors.
The civil war occurred during a period when there were powerful states on the world stage, Nazi Germany and Fascist Italy, who were ready and willing to supply needed logistics and manpower to other right-wing states. It also happened when both of those states were not yet embroiled in their own world war, giving them the opportunity to send more resources and aid than they would've have been able to justify a handful of years later.
On the other hand, the Anarchists (and Liberals) of Spain had no allies on the world stage willing to help them besides some meager aid from Mexico (who lacked the ability to send airplanes or tanks), and a few secret shipments of aid from France. The USSR ended up sending the most weaponry, but only to the Marxist-Leninist faction so they could control the country if they won, and those same marxist leninists targeted the Anarchists towards the end of the war in an effort to shore up their power.
Spain simply hadn't developed enough military industrial capacity before the war to avoid being so reliant on foreign logistics. As General Pershing supposedly once said, "Infantry win battles, logistics win wars." That's ultimately why the allies were able to defeat the Axis in WWII as well, since the combined industrial and logistical capacity of the allies (especially with the introduction of the US's industrial capacity), simply become overwhelming.
Any system or ideology in the same circumstances as the Anarchists in Spain is not going to have good odds of succeeding.
The point of people such as myself using it as an example is that it proved out that society organized around Anarchist concepts does work, and it doesn't result in authoritarianism like revolutions from other ideologies tend to.