The work done by an elastic force is the work done due to the deformation of an object.
$$W = \frac{k \Delta x^2}{2}$$
where,
Wā work done; kā spring stiffness constant; Δxā displacement.