Earth being considered like a solid sphere, we can use the
result of gravitational field strength of a solid sphere for obtaining the
field strength due to Earth at various locations on surface of Earth, inside
Earth, and at some altitude above the Earth surface.
Like the case of a solid sphere, outside the surface of
Earth also gravitational field strength varies as inversely proportional
to square of the distance from Earth center, we can also express the result as
a function of the height above the Earth surface.
Similar to this inside the Earth gravitational field
decreases with linear variation with distance from Earth center. See the below
videos for the derivation of results of gravitational field strength at various
points due to Earth.
Gravitational Field on Surface of Earth :
https://youtu.be/3sMpBgwFykw
Gravitational Field at a height above the Surface of Earth :
https://youtu.be/9fdATrvOhOs
Gravitational Field at a depth inside the Surface of Earth :
https://youtu.be/alH5e0Q77mI