Same as many countries, Spain has Laws for non EU citizens, here you can read about it:
Laws for non EU citizens to live in Spain
If it is your intention to come to live in Spain (rather than simply visit the Schengen zone for the "up to 90 days in any running 180 day period" time limit that applies to all non-EU citizens) you must now BEFORE YOU COME first apply from within your country to the Spanish Consulate in your region, for the required pre-entry visa. That’s either a "Non-Lucrative Visa" under which you can temporarily reside in Spain for up to 12 months whilst you make your Residencia application, but which forbids any working for income ; or if you have a formal Spanish job offer in writing then a "Work Visa", One of the conditions of being granted a Non-Lucrative Visa is that you can show the Consulate proof of the minimum regular monthly income per applicant required by the Spanish Consulate (which they require you to have in order that you can support yourselves whilst in Spain and so not become a burden on Spanish taxpayers) .
There are several other Laws for non EU citizens
including a criminal records check report, and proof of full-cover private Spanish medical insurance for the period of the visa, etc. Any supporting documents not in Spanish will need to be Apostiled and translated into Spanish by an official Translator. I would very VERY strongly advise you to make your pre-entry Visa application through a specialist lawyer, as if any part of your application does not meet the requirements your entire application will be rejected and your application fee lost. You must have obtained that approved pre-entry visa BEFORE you then come to Spain, as it is that visa which gives you permission to reside temporarily in Spain whilst you then obtain and submit all your formal Residencia process documents etc.
Be aware that then once in Spain
as part of your Non-EU citizen Spanish Residencia application, as well as showing the approved Pre-entry Visa which allowed you to enter the country to live temporarily, you will need to show Spanish bank statements etc proof that you have brought into Spain a minimum of at least 4 x "IPREM" to support yourself, or documented proof you are earning more than that in Spain.If you are bringing any other family members with you, then you must add at least 1 x IPREM for each of them.This "IPREM" amount increased on 1.1.21. by 5% for year 2021 and is now 6772 euros.So you will need to bring into Spain a MINIMUM approx 27,500 euros with you, plus 6,772 euros for each of any other family members, to qualify as financially self-supporting to obtain Spanish Residencia. As part of your Residencia application you must also show proof that you’ve taken out at least an annual full, all-conditions-covered Spanish private health insurance policy (including cover for any pre existing conditions), for each person you are bringing in. There is also plenty of other bureaucracy on top of these big initial issues, including the requirement to take a Spanish driving test (in Spanish) as your (non-EU) driving licence ceases to be valid for use in Spain after you’ve lived there for 6 months. More information can be found here:
Now you know what there is to do, why not look at some property for sale? Klick here