extension is directly proportional to force that the spring exerts on the mass.
how much an elastically deforming object stretches for a given force depends on the spring constant
the spring constant depends on the material, the stiffer the object the larger the spring constant.
the relationship between extension and the force is called Hooke's law