The total energy is conserved.
Elastic potential energy, gravitational potential energy, and kinetic energy.
When the spring is coiled up it has gravitational potential energy, these then change to kinetic energy when it springs down, and then elastic potential energy when it is all the way expanded.