textbooks---- "potential increases towards infinity and is maximum at infinity"
But that is true only when we are seeing potential w.r.t Earth
So , as we know that gravitational potential at a point is the work done or the amount of work needed to move unit mass from infinity to that point so means if a point is near to the planet or the mass which is creating the gravitational field then you need to work more to move a unit mass from infinity to that point so this means potential energy near the planet is more than that of a point away from planet but in reality we consider the inverse of this statement that a point away from the planet has more potential energy than that point which is near . But in doing so we are considering that negative work is less than the positive work and this is not true.
Also, then we are considering a EARTH the reference frame (or we are considering potential with respect to earth),not infinity...........