On the chart, you can see the share of electricity from the combination of solar and wind in each country. Their rate of progress has been very similar.
In 2023, both countries generated around 40% of their electricity from these sources. Wind power is more prevalent in Portugal, while solar is more used in Spain.
This data comes from Ember.