Arduino Example Code Does Not Work Correctly

I was experimenting with the example code for RFID Servo in the IDE. Instead of being still and not moving In between locked and unlocked the servo motor twitches back and forth , making it’s way toward the unlocked position. I’m still learning and can’t figure out why. I have attached a copy of the code I am using and a pic of the hardware. And I am aware the reset button for the RFID reader is not there.

RFID Servo.txt (19.8 KB)

How is the servo powered ? Using an external power supply with a GND connection to the Arduino or directly from the Arduino 5V and GND pins ?