Hi,
Sounds like you have already found the problem, congrats!
From what you have posted it sounds like you will be looking for part #
279816.
WHIRLPOOL
279816 Dryer Thermal Cut - Off Kit,
AP3094244

Notice the part comes with both the upper and lower limit thermostats that are mounted to the left side of your heating element.
Make sure you use both new limit thermostats in the kit. If you replace just the upper one that is bad without replacing the lower one too the new part may fail again.
Also make sure your dryer vent is clean. I would also remove the fan housing and make sure it is clean. Sometimes the fan housing will pack with lint.