A mass attached to a vertical spring causes the spring to stretch and the mass to move downwards. what can you say about the spring's potential energy (PEs) and the gravitational potential energy (PEg) of the mass?
The system consisting of a mass and a spring (and Earth) is closed. Therefore its total energy must be conserved.
When a mass starts to move downdwards, it gains some amount of kinetic energy. But at the lower end of this move there is a moment when the mass is in rest, so its kinetic energy is again zero.
At that moment, the loss of gravitational potential energy by the mass must balance the gain of spring's potential energy.
Yes, here we ignore the mass of a spring and possible heating of a spring.