I think it is best to book it on internet or even book it when you book the flights.
[html][/html]
There are pick up points at Malaga and Granada airports and all companies have a pickup and drop off point in Granada itself.
Here is a list of hire car companies that have offices in Malaga and Granada.
The prices vary enormously according to the date so it is best to have a look at the websites.
By the way this page tells you where to park in Granada.
https://granadaforo.com/getting-around-in-granada/where-can-i-park-in-granada/
Car hire websites
An incredibly cheap place is delpaso. They only have pick up and set down in Malaga.
https://delpasocarhire.com
https://atesa.es
https://europcar.es
https://alquiauto.es/
https://hertz.com
This site will tell you the distances between Spanish cities.
https://crazycalculations.com/distances/
This link will show you the distance to Granada from other Spanish cities with driving instructions.
https://crazycalculations.com/distances/granada_other_cities.php