You should start a new topic as your post is on a different topic to this one and you may get more information.
Off the top of my head there are 3 Visa types that you could be eligible for or a 4th Golden Visa if you purchase a property over €500,000. All of them have to be applied for before entry to Spain. At the moment you can only stay 90 in 180 days. So once your 90 days are up you have to leave. You wouldn't have an Irish or any EU country Great Grand or Grand parent in the cupboard anywhere to get you an EU Passport?
Non lucrative visa
Digital nomad visa
Study Visa
Bee