Whirlpool Dryer

The dryer only heats with the setting at a fixed time. Sensor heating does not work. Does replacing the sesor solve the problem?

It’s possible the sensor is out. If you have an ohm meter remove the wires from the sensor and check for continuity.
Nat