Animating rocking horse with a spring base
Can be done with one spiral curve and a few modifiers, order is important


add Extra curve (addon) > Spiral
search Convert to Mesh
deform by Simple Deform modifier > Bend
add Skin modifier (after deform so spring is not squized/stretched)
add Subdivision Surface modifier is needed to smooth shape


Animate Deform Angle in Simple Deform modifier properties. For nicer result you can use Elastic keyframe interpolation T on animation curve in Curve Editor.





For a bit more advanced spring shaping you can try also this similar technique here.

Or for easy animating things like spiral cabel I highly suggest Armature, generated by aawesome addon Armature from Edge Loops, that generates armature inside of spring, but I'm not sure if ported to 2.8x version
Tutorial with blend can be found here
https://blenderartists.org/t/phone-cable-with-armature-in-3-min/520741