Figure out your residency (digital nomad, non lucrative visa from passive income, etc). Find where you want to live. Find a property within that area. Use word of mouth, find someone locals trust, have them help you with maintenance and pay them for that help. I use both Wise and Santander. Idealista is, by far, the biggest real estate website in Spain. Use this to start your search. Some properties are going to be held by local agencies, and you're going to have to talk to folks on the ground to see those listings (wildly different market than Zillow and Redfin in the states). There is an annual wealth tax on globally held assets >€2M, if this potentially applies to you, seek assistance from a Spanish tax advisor. I strongly advise not buying over the Internet and buying in person to avoid scams and fraud. Use a legal advisor to facilitate your purchase as you would with an attorney in the states.
https://old.reddit.com/r/GoingToSpain/ helped me, I hope it helps you. Safe travels, wishing you the best.