The following information is published on the British Government's webpage, ·LivinginSpain:
From 1 January 2021, you must have at least 6 months left on an adult or child passport to travel to most countries in Europe.
If you are legally resident in Spain and in scope of the Withdrawal Agreement, the requirement to have 6 months left on your passport does not apply if you are entering or transiting to Spain, but will apply if you are visiting another EU member state.
If you renewed your current passport before the previous one expired, extra months may have been added to its expiry date. Any extra months on your passport over 10 years may not count towards the 6 months needed.
Editorial comment: the way things are going at the moment, if there is a No-Deal Brexit then the Withdrawal Agreement and the above information might be invalid, perhaps.