Yes, if your UK licence is dated before the 16th March 2023 and you have Spanish residency. See here for more details.