when the furnance is turned on, the heater stays on for a few minutes and then shus off. could this be related to the thermostat ?
Flame sensor.
You can carefully clean it with some steal wool.
Also, check your pressure tubes and make sure they are properly sealed at both ends.
If you don’t know what these things look like, …call a pro.
No messing around on these.