It happened about 2 hours ago. I was trying to reach a person via phone call and forgot to take out the charging cable, right after I dropped the call, my phone just told me that there was a temperature issue and it's going to turn off. After turning it on the phone showed me the same prompt as before "the maximum warning temperature has been reached" and shut down. The phone itself wasn't even warm to the touch. I've left it to 'cool off' and picked it up again two hours later and the issue still persists. Every time I boot it, the phone just shuts down after the message.
I've tried booting it in safe mode, with no result The phone just boots up, works fine for 10-15 seconds and then just shuts down again after the "the maximum warning temperature has been reached" message. Current battery charge is at 16%. I have connected it to my pc and am charging it from there to have a lower electrical current charging it. The phone is absolutely cool. Still no boot.
I am running the newest version of Android 9, installed it 2-3 weeks ago with the new system update.
Newer had a major fall of the phone or any sort of puncture, so no probable forceful physical damage. I think the phone's OS is just bugging out.