So I've had my note 9 for about 2 years and it's never given any problems until just a few days ago. I pretty much only charge my phone at night so when I'd put it to charge it immediately heat up, froze, and then it would just reboot. It did this every single time I had it charging. I just left it alone because if I tried to use it while charging it'd just get super hot and reboot again. There were no pop ups or anything that made me think something an app might be causing this except when I would optimize the phone it always said there were 2 apps it had to shut down. So I uninstalled unnecessary apps, I cleared the cache partition, manually reboot the phone, yet nothing helped. It's the last thing anyone wants to do but I ended up backing everything to my Samsung account and Google One. I factory reset the phone and logged back in to my accounts, it's like nothing even change, but now it doesn't even heat up, no more freezing, no more rebooting on it's own, and if anything if feels a little faster. If you have a similar issue try doing everything I did, I wish I would have known sooner!
I had that similar experience with the over heated with my note 8. This is what i did. Let my phone battery power go all the way down to 1%. Then turn it off charge it. Try that.