Samsung dryer DV330AEW/XAA doesn’t spin

My Samsung dryer (10 years old) when started makes a humming noise but doesn’t spin. If I hold the door switch and turn it by hand, it starts spinning. I have opened the dryer and cleaned inside. Belt, rollers and drum look fine. Seems like the motor might need to be replaced but the motor and drum spins fine once I give it a shove. Any help will be much appreciated.

Thanks!