Try using without a case and then see, but from what you told, it seems motherboard (some shorting) or processor fault. Get it checked. They will connect meter with its battery terminals and it will instantly confirm if it's hardware or not.
If you use in AC room, it will work reasonably ok but get hotter than normal.
If you use it outdoor or heavily, it will get super hot 70-80C+ and thermal protection system will activate, resulting in phone turning off or restarting in bootloop.
Thermal protection does not activate in normal cases, unless you use it brutally outdoors or there is some issue in hardware.
CPU Z app > Thermal . It will show phone temperature in detail. Please note the readings when phone is in standby and getting hot. It helps a lot.
Phone getting warm on standby after reset is a good sign hardware is faulty.