Is it worth insulating the roof of a detatched, unfinished garage, but not the walls?
It would be a huge waste of time and money to insulate only the roof area.   Insulating overhead would only make any (small) sort of noticeable difference if the roof were black and you had a yard configuration where the garage roof was fully exposed but the surrounding area was shaded.
If this thing is sitting out by itself in the open then there is no gain for sure.
Now I see two options:

Raise that garage up - this may not be as hard as you think.  I just did this for a 10x16' barn.

Insulate from the outside.   You can attach rigid insulation + covering on the outside that could dramatically help.   This is what we are doing with a lot of older HOMES in my area that did not get properly insulated.   On some of them we are adding a good 3-4&quot; to each side.   If you can do this than doing the roof/ceiling is appropriate.