For British Traveling to Spain you can book a return test for leaving Spain, plus the two day PCR when return UK on line 'Randox' link.
Very helpful member
https://covid.randox.com/day-2-test-at-home/
They give a DIY Kit Rapid self test, required return UK. plus arrange to 2 day test from your home address.