This question is similar, but not identical to: The Hand from Maximillian's Earthen Grasp - where can it move?
Whereas the aforementioned question is about whether the hand’s movement is measured from the hand’s point of view or from the caster’s, this question revolves around the total distance the hand can travel to reach its destination.
To illustrate, let me give an example: Two narrow stone pillars stand next to each other, 10 feet apart. They are several kilometers high and on top of each pillar stands a wizard. One wizard casts Maximillian's Earthen Grasp and lets the hand made from compacted soil rise from the ground on his own pillar. With another action, he wants to move the hand in order to restrain the other wizard, who is within range of 30 feet.
Would the hand retract into his own pillar, then rise again from the ground on the other pillar? Or would the hand move several kilometers down the first pillar, across the floor, then several kilometers up the second pillar? What if both pillars would float in the Astral Plane, without a direct ground-based connection between them?
This might seem like a stupid and unnecessary convoluted question, but lo and behold, something similar happened in one of my games.