Chosen Solution
I Have iPhone XR heats up badly: Device does not have any warranty because it has display replaced out of the apple. Tried following steps so far. Took logic board out of the assembly , connected battery without any other components on board. still it heats up within a moment. That proves that the problem is on logic board.Heating spot is identified on middle of logic board where CPU is located. Any suggestions will be appreciated.
Two things contribute to heat up the CPU, first a heavy load by a process and second a bad thermal conductivity, to eliminate the first possibility you need to make a backup file using iTunes then restore your iPhone to factory settings, try it for a couple of hours or minutes depending on how it behaves and if everything works fine then you might need to reinstall everything without using the backup, in case of persisting issue try to review your cooling CPU circuit.