The thermostat operates for a reason. Before resetting it, find the reason. It might be a blocked filter, blocked condenser or a more serious accumulation of lint. It might simply be that too much was in the drum - something is stopping the air flow to cause the stat to trip. Fix the cause first or you might have a fire on your hands and need a new kitchen/house.
Mike Fire Investigator, August 2021