Apple specifically said when you get a new iPhone 15 Pro model that for the first few days as it indexes the billions of bytes of data, it will run warmer than you may have experienced before. While its doing its normal housekeeping activities, you may be trying to do more things on the phone at the same time, so that will make it run even warmer. And when you charge an iPhone, the battery heats up naturally as that's what happens when you charge a battery.
Give it a few days. Don't push it hard while it's setting itself up for a couple days. Accept that your iPhone will get warm if you push battery intensive activities such as streaming video, playing video games, watching YouTube videos, etc.
Finally, getting warm and overheating are completely different. iPhone has circuitry built in to protect it against overheating. If your phone things it needs to cool down, you'll see a message on the screen with a thermometer, telling you the phone needs to cool down. If you are not seeing that, your phone isn't overheating.