A social security number ( not to be confused with an NIE number) is only obtainable if you are becoming self employed OR if you have a written job offer in Spanish known as a “pre- contrato” OR if you are a foreign pensioner who has entitlement to health care funded by their home country.
UK citizens who are prospective Employees have to have amongst other things a copy of the AUTORIZACIÓN DE RESIDENCIA Y TRABAJO POR CUENTA AJENA DE DURACIÓN DETERMINADA. Their visa application must be submitted IN THE UK within ONE MONTH from the notification to the employer of the authorisation grant; A copy of the employment contract in relation to which the authorisation of residence and employment work with fixed-term contract was granted, stamped by the Immigration Office; A document signed by the worker committing to return to their country of origin once the employment relationship is concluded. European applicants need only to make a prior appointment by telephoning 922 60 25 10 and taking this application form together with a written job offer, their Green residence certificate and their passport. From October 2018 these transactions will have to be undertaken electronically see here
UK citizens who are prospective Self employed persons must have applied for a self-employed Visa IN THE UK prior to starting their activity in Spain. TRP ES-EN.pdf (exteriores.gob.es) European applicants only need to make a prior double appointment by telephoning 922 60 25 10 and taking this application form and this one together with their Hacienda documentation modelo 36/37 and their passport and Green residence certificate. From October 2018 these transactions will have to be undertaken electronically see here
EU Pensioners (or UK citizens who have taken advantage of their Article 50 Brexit rights) make an appointment at a different office this can be done on line here they must provide their S1 health entitlement documentation, green certificate of residence and passport