No, unless you invest 500,000 € in your house and can apply for the Golden Visa or you apply for the non-profit visa (non lucrative visa) to retire in Spain.
The end of end of Golden Visa incentive: The Spanish government has announced in April 2024 its intention to eliminate the possibility of obtaining Spanish residency in exchange for a minimum investment of €500,000 (known as the ‘Golden Visa’). The details of this draft law are not yet known.