In lifting the object, energy is transferred, through work, inside the system. This work is done against gravity (#"weight"=mg#) through a vertical displacement #h#; so we have that the (Gravitational) Potential energy will be equal exactly to this amount of work, i.e.: