Don't get caught out on the changes to travel for non residents with UK passports.
The requirement is that you must have at least 6 months left on your UK passport at the time of entry (I thought mine had for my potential visits in June and August as it expires in Feb 2022).
However the big catch is that the dates are calculated from the ISSUE DATE of your passport and works from 10 years from the Issue Date. A lot of people in UK renewed their existing passport and the passport office have added on extra months that were left from their last passport. From 2021 these extra months added on are no longer included in calculating how many months left.
There is a UK government website for Renewing Passports and this has a calculator to tell you when you need to renew your current UK passport to travel to Spain. Unless you have recently renewed your passport I recommend that you all check this out. You will be surprised at the dates quoted.
For me I am just glad that someone brought this to my attention, I dread to think about at last getting to the airport to travel only to be turned away because of my passport date.