The safety stat, as identified, may be at fault.
Or the element, or the circulation fan, or the cooling fan, or the thermostat, or even the timer itself.
Impossible to tell over the internet.
Cheapest item to try first would be the safety stat if the fault isn't obvious.