iPhone 6 is an outdated iPhone (9 september 2014), which also affects the battery life.
That may be the cause of the problem.
Have an iPhone 6S here, in normal use it's fine, but it got really hot only during the last update to iOS 15.
Have the battery replaced by an Apple Authorized Service Providers, because now it is still possible.
For older iPhone type is a bit trickier, I don't see any older iPhone type in the list,
See here:
https://support.apple.com/iphone/repair/service/battery-power
If you are going to replace the battery, by Apple or an Apple Authorized Service Providers read this Apple article:
Get your iPhone, iPad, or iPod touch ready for service
https://support.apple.com/en-us/HT201557