Are you using DC or DCC? Either way I would look to see if the track is clean- wheels clean.
Do you have more than one loco? . If you have more than one, do they all do the thing?
I currently designed a nscale layout. I am having problems running the engine. It stops and starts. Runs for a few feet and then stops. With a little push it picks up speed. I went back, checked all connections still won't run. When back and soddered all connections. Still won't run. Sometimes does run for a 10' to 12' then stop. other times less. Need help.