Sup EliteWarrior, There are two main reasons why your iPhone might shut down after overheating:
Safety Feature: iPhones are designed to shut down as a safety precaution when they reach a temperature that could damage the internal components. This is similar to a pressure release valve on a cooker.
Battery Issue: In some cases, overheating can be a sign of a problem with the battery itself. A degraded or faulty battery can generate more heat than usual, leading to a shut down.