Hello demilovebabe,
We understand your iPhone received a temperature warning recently and are happy to help out with that.
For more information on keeping your iPhone within acceptable operating temperatures, please review the following resource:
Keeping iPhone, iPad, and iPod touch within acceptable operating temperatures
When this occurs, please place your device in a cooler environment until it's able to boot back up safely.
When it boots back up, we'd also recommend checking your battery health under Settings > Battery > Battery Health, just to ensure that it's not in need of replacement.
If your iPhone continues to experience issues, please contact Apple Support here: Get Support
Take care!