Motors and servos should have their own power source, as the Arduino 5V output is not designed or intended to be used for motors or servos. In some cases, trying to use that output that will damage the Arduino, in other cases, the Arduino tends to malfunction.
Don't forget to connect all the grounds. Example:
