This is a complicated question and the reality is constantly changing:
To see links to all major Spanish mobile phone companies Click here
If you are a visitor from ouside the EU it may be a good idea to get an esim
Ask you local operator if they can offer you any good deals.
If you live inside the EU you should be able to do roaming at the same price as home
Frequently asked questions about Granada