This very interesting article basically says it was likely to be either human error or a system fault that caused the Iberian apagón or grid shutdown.
Not an excess of wind or solar, not a cyber attack, not a weather abnormality.
However, because of the uneven and rapid expansion of solar and wind, the system relies on quick corrections to rebalance frequency & voltage. Seems likely there was a system fault to do with the rebalancing mechanism.
Somebody with decent chops has produced some excellent digests of events leading to similar, on Wikipedia. ( went down this rabbit hole quite recently)