Intermittent jittering servo
A servo motor requires a lot of current.

Many have problems when using a servo motor. Sometimes it works a few seconds and then it starts to jitter or it moves a little and then stops or it does nothing and makes a small click noise.

The problem is that servo motors requires a lot of current. Even the small servo motors can require a peak current of 0.5 A. Larger, stronger, and faster servo motors can easily request a peak of a few Amps.

To find the maximum current for the servo motor, look at the stall current of the servo motor.
When a servo starts to turn, it needs a short peak current. That peak current can be near the stall current.

Don't buy a "strong" and "fast" servo motor. 
That may sound appealing, but it is better to start with a humble and timid servo motor. 
The servo motors have a DC motor with gears inside. Because of the gears it is already strong.

Use a power supply of 5V with enough Amps to be able to supply the stall current of the servo motor.
Use that power supply to power the servo motor (the red wire).
Connect the GND of the power supply to the GND of the servo motor (the black wire) and the GND of the Arduino board.

The 5V pin of the Arduino board can not supply enough power for a servo motor.
It is in the official Arduino examples, but many run into problems with not enough power.