You surely don’t want your Spain holiday to get ruined by outrageous roaming costs and therefore I recommend you buying a sim card in Spain. It is simple, just walk into any mobile internet store and ask for a prepaid Spain sim card, put it in your phone, get it activated and within a couple minutes you are online.
To help you out I wrote this complete guide for buying a sim card in Spain with up to date prices as per March 2022, best 4G/5G network in Spain, where to go, EU roaming, e-sim cards for Spain and much more.