Some activities such as charging or a lot of computational activity, generate heat. Some warmth is to be anticipated.* Read this article about keeping your iPhone, iPad, or iPod touch within acceptable operating temperatures - If your iPhone or iPad gets too hot or too cold - Apple Support
I would also review your Battery Health in Settings. See if there are particular apps that are running all the time that are using large amounts of power.
If you think there is a problem with a device, have Apple inspect it. Go to this page to find your nearest Apple Authorized Service Provider (AASP) or Apple Authorized Distributor (AAD) --> Find Locations
How to make a Genius Bar appointment
1. Go to Genius Bar Reservation and Apple Support Options - Apple
2. Go to "Get hardware help".
3. Select your hardware and continue selecting options requiring replacing parts until you see "Bring in for Repair"
4. Sign in with your Apple ID
*"Your iPhone might get slightly warmer while it charges." - from: How to use your MagSafe Battery Pack - Apple Support
Software upgrades may introduce new features which may add to power drain. Check the Battery Health feature to see if there are apps running that use a lot of power. If there are, decide if you need them running all the time or can turn off a feature when it is in the background.