I solved my own problem, I realized the frequency was too high and that the duty cycle should be between 5 and 10 percent.
I used Sparkfun's PWM page to help me get this information and solve my issue. The link is here:
https://learn.sparkfun.com/tutorials/pulse-width-modulation/all
Also my code is here for anyone who may run into the same issue with a servo motor:
from machine import PWM
from time import sleep
pwm = PWM(0,frequency=50) # use PWM timer 0, with a frequency of 50Hz
pwm_c = pwm.channel(0,pin='P8', duty_cycle=1)
while True:
pwm_c.duty_cycle(0.097)
sleep(1)
pwm_c.duty_cycle(0.043)
sleep(1)
pwm_c.duty_cycle(0.097)