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)
Thank you for writing to Samsung.
Samsung Customer Support