What is the best way to turn the knob on a lamp automatically?
One option would be to use a 3D printed adapter to mount on the knob. Then add an excentrical mount for a small steel shaft that attaches to the servo.

Or another option would be to use a stepper motor with a gear-belt or rubber-belt, depending on the force needed to turn the knob.