Chosen Solution
The whole iphone was broken at first with a bent housing and severely cracked screen. I decided to fix the phone and got a third party replacement screen and digitizer. While in the process of removing all the parts in the iphone i ripped a flex cable part of the charging port. Cold that be the reason the logic board is overheating because of loose power?
It’s hard to say, i highly doubt that because you ripped the charge port cable that it is the reason its getting hot. It could be the battery causing the issue or it could be because of the damage to the phone previously. What troubleshooting steps have you attempted so far?