They are not the same, the beam is slightly offset towards the side of the road for whichever side you drive on.
UK RHD lights would tend to dazzle oncoming traffic in Spain.
You may be able to use cutoff stickers if you can’t adjust them enough.
If it is a permanent move to Spain, you will...