It was neither. The grid got unbalanced because the weather was hot in the south and cloudy in the north, and a lot of solar power in the north could not deliver when the south all turned on their air conditioners. Then the big inter connector between Spain and Portugal was under-par because it was hot and its carrying capacity was inadequate for the demand . Once the grid frequency (supply / demand, gets out of balance, the system shuts down like a tower of cards toppling over.
Most of us have no idea of the important work that goes on behind the scenes to balance electrical supply and demand. These kinds of happenings have occurred in the USA recently too - a year or two back there were big black outs caused by similar issues.
It can take a long time to get everything back to normal too, because once large areas have shut down, and everyone's equipment is still switched on, it is difficult to start up again, because all the load demand is still switched on so when generators start up again, they have massive loads on them which in the end translate into possible mechanical failures from over stressing turbines and cables.