Welcome to Vodafone Community
Vodafone UK cannot control what happens on a foreign network so it could be the Spanish network having mast congestion issues etc.
Do you receive 3G Ok ?
Current Phone > Samsung Note 9 _512Gb > Model: SM-N960 Hybrid-Duos.
Samsung One Ui / Pie.
Samsung Gear s3 Frontier Watch.
To confirm if you are roaming on Vodafone ES as far as connection is concerned you shouldn't have any problems.
If your data immediately disconnects, it sounds like you may have roaming data turned of on your phone or a roaming data restriction on your account. If it's your account the restriction will need to be removed by contacting customer services. The number to call can be found here: Contact Us.
However, it's always best to determine if the problem could be a phone or SIM issue. If you are with friends, this can be done by trying your SIM in your friends phone and your friend trying their SIM in your phone. If you post back what happens this will give an indication if it's SIM, phone or account related.