If we let the mass hang still, thus extending the spring from its natural length, we will see that the mass comes to rest at what is called static equilibrium.
In attempting to model the vertical motion of this mass we would impose a coordinate system for y(t), the vertical displacement from the static equilibrium. Engineers refer to such a system as a Single Degree Of Freedom System (SDOFS), as we are tracking only one variable, namely, y(t), vertical displacement from the static equilibrium.
For consistency, let us say y = 0 is the spring's vertical displacement at the spring's static equilibrium and is the distance of mass displacement from that static equilibrium and denote positive in the downward direction and negative in the upward direction. That is, if we extend the spring 3 cm downward then y = 3, while if we compress the spring upward 2 cm then y = -2.
We are going to use a Free Body Diagram to depict all the vertical forces acting on the mass in this case. We show the mass pulled down just a bit beyond the static equilibrium position with the only force acting on it being the restoring force of the spring which acts in an upward vertical direction.