Most tutorials will have you make a camera shake from CameraShakeBase or MatineeCameraShake and then hook it up to ClientStartCameraShake that is on some custom event with a small interval, this will make a decent camera shake but not as realistic.
Lissajous curve gives a natural feel but requires a phase offset for one oscillation which is impossible in normal camera shakes (they just offer sine wave or perlin noise, sine wave doesn’t offer custom offsets, a cosine would work but it’s not an option).
In the image below I posted my solution, 6.28 is just two PI, 3.539… is my footstep frequency, 10 and 5 are just amplitudes and 77.5 is the default camera Z offset.
The TickHeadbobMul variable is by default 0 and approaches 1 as you sprint and reach your full speed so it eases into the camera shake.
The camera I’m using has pawn control rotation turned ON so setting relative rotation does nothing, but you can still set relative location and have a good looking camera shake.
Further optimization could be to use Jonathan Blow’s shader trick ( A Shader Trick – The Witness ),
so that camera shake wraps around cleanly once the variable reaches max time but I think that’s overkill.
Lissajous curve that this attempts to emulate:

