Dear Samsung Member,
Greetings from Samsung Customer Support!
Follow the given link resolve overheating issue:- https://www.samsung.com/in/support/mobile-devices/why-the-heating-issue-occurs-in-mobile-device/
If issue still persist or for further assistance, kindly register your concern in Samsung members app (Samsung Member > Get help > send feedback > Ask question/Error report)
Note: For better assistance, please send device log files within 15 minutes of issue occurrence along with the exact issue details.
Thank you for writing to Samsung.
Samsung Customer Support