The travel status depends on the country you are traveling from. The safest way is to contact the Embassy of Spain before booking a ticket and check the latest COVID-19 response measures.