Dear Student,
We know that
As we go up from surface of earth, the distance from centre of earth increases due to which value of g decreases. But the above formula is not true in case of going down inside the earth. The value of g also decreases as we go down inside the earth and becomes zero at the centre of the earth.
Regards