If you are resident in Spain, you should carry your residence document (the green paper EU residence certificate or the new TIE), as well as your valid passport when you travel. If you have applied but not yet received your document, carry proof you have started the registration process. Padron certificates, utility bills and property deeds will not be accepted by Spanish authorities as proof of residency.
Additionally, all passengers (excluding children under the age of 6 years old) travelling to Spanish airports from ‘risk’ countries, as determined by the European Centre for Disease Prevention & Control are required to present a negative PCR, TNA or LAMP test taken within no more than 72 hours prior to arrival, in order to enter the country. See Entry requirements for further details.
And:
You should not use the NHS testing service to get a test in order to facilitate your travel to another country. You should arrange to take a private test and should confirm with the testing facility the type of tests available prior to booking an appointment.
I don't want to scare you and you might already be aware, but this is a 'heads up' just in case you need new info. I hope all goes well. xxx