I read this today and then realised we Brits are NOT in the European Union so we can't vote even though we live in the EU.
On June 9, 2024, elections to the European Parliament will be held for the next five years. In these elections, nationals of European Union countries who have previously expressed their intention to vote in Spain for these elections will be able to vote. In Spain, in addition to people with Spanish nationality, those from European Union countries who have previously expressed their intention to vote in our country may vote.
Foreign residents in Spain can formally declare their willingness to vote in the European elections via the Internet, by post or in person at City Hall.