Yah, the processors in these things are highly capable and can put out a lot of heat. If it becomes uncomfortable, try looking at your environment. Switch to a less constrictive protective case. This can help for a number a reasons. Some cases can impede cellular and wifi strength and cause the device to work harder to maintain a connection. Some cases can also be thermally restrictive and don't dissipate heat very well. See if you continue to have issues if you go case-less. The iPhone has a ton of safety sensors and will automatically shut down if it becomes too hot, so you don't have anything to worry about: https://support.apple.com/en-us/ht201678
Apple also provides the following info from https://support.apple.com/en-us/ht201678 :
Your device might get warm
When you use the device or charge the battery, the device might get warm. You might notice that your device feels warmer in these situations:
- When you set up your device the first time
- When you restore from a backup
- When apps reindex or reanalyze data, like Photos tagging for faces, places, or keywords after a software update
- When you use graphics-intensive or augmented-reality apps or features
These conditions are normal, and your device will return to a regular temperature when complete.
Here are some of the higher ambient-temperature conditions and activities that might cause the device to change performance and behavior:
- Leaving the device in a car on a hot day.
- Leaving the device in direct sunlight for an extended period of time.
- Using certain features in hot conditions or direct sunlight for an extended period of time, such as GPS tracking or navigation in a car, playing a graphics-intensive game, or using augmented-reality apps.