Nothing keeps asteroids moving. The Sun’s force deflects their paths but is not needed to keep them moving. From Newton’s 1st Law, an object that is moving tends to stay moving at constant speed in the same direction, unless a force acts on it. So, once set in motion, an asteroid in outer space just keeps moving.