Let’s define “overheating”, which is always a hardware problem. If a device overheats it shuts down so it can’t be used, and displays a message saying it must cool down before it can be turned on, and it will probably be unusable for an hour or so. If you are seeing this it is a hardware problem and you should contact Apple support:
Note that both of the above have options to receive a callback or chat
If you are not seeing this your iPhone or iPad has not overheated. However, if you fast charge your device it may get very warm, and may pause charging at 80% and display a message saying that charging has paused, and will resume when the phone cools down. This is NOT overheating, and is normal when fast charging. It also won’t prevent you from using any app you have on your phone.
If you have just updated allow a couple of days for iOS to complete its “housekeeping"
Some apps that use a lot of energy or that use cellular data rather than Wi-Fi can cause the phone to run warmer. Worst offenders are Meta products (Facebook, WhatsApp, Instagram, etc), interactive games, watching streaming videos, the Camera app and any other app that uses the camera (TikTok, Snapchat, etc). Charging while using apps will also generate a lot of heat. And having VPN installed, whether using it or not, can also consume a lot of energy. But none of these can cause “overheating;” iOS will limit energy use to keep the phone safe, perhaps by dimming the screen.
Lately there have been reports of the Amazon app and Words With Friends 2 using excessive amounts of energy, which, as already said, can cause the iPhone to heat up. And periodically other app releases may not have been thoroughly tested that will cause similar symptoms.
All of these are manifestations of the 2nd Law of Thermodynamics.