Let’s define “overheating”. If an iPhone 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 phone has not overheated. However, if you fast charge your phone may get very warm, 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.
Also, some apps that use a lot of energy or that use cellular data rather than Wi-Fi can cause the phone to run warmer.
Are you following the best practice of charging overnight, every night? The absolute best way to get maximum use on a charge, as well as slow the decline of battery capacity long term is to enable Optimized Battery Charging (Settings/Battery/Battery Health) and charge the device overnight, every night. The battery will fast charge to 80%, then pause. During the nighttime pause the phone will use mains power instead of battery power, allowing the battery to “rest”, and thus reducing the need to charge the battery quite as often. The phone will resume charging to reach 100% when you are ready to use your phone; it will “learn” your usage pattern. If you enable iCloud Backup (Settings/[your name]/iCloud - iCloud Backup) the phone will back up overnight also, assuring that you can never lose more than the current day’s updates. Here's more information→About Optimized Battery Charging on your iPhone - Apple Support
If you do this the phone should last through the day to the next night, unless you are a very heavy user of interactive games, video streaming, or a lot of cellular data use rather than Wi-Fi.