Dear Samsung Member,
Greetings from Samsung Customer Support!
Kindly follow the below mentioned step to improve the performance of the device:
1. Close background running apps when not using them.
2. Avoid usage of mobile phone during charging: avoid the usage of the mobile phone while charging.
For further details please click on the mentioned link: https://www.samsung.com/in/support/mobile-devices/why-the-heating-issue-occurs-in-mobile-device/
For further assistance, register your concern in Samsung Members Application (Samsung Members App > Feedback >Error report > Attach log file for any issue)
Thank you for writing to Samsung.
Samsung Customer Support