Drag the block on the end of the spring and see the force being applied to the spring and the energy stored in the spring.
It is important to note that the energy stored in the spring (the potential energy) is at a minimum for a certain length and increases as we move away from that.