1. Install only necessary applications
2. don't install unnecessary apps which is can make device lagging
3. Don't use device while its charging
4. If u have received the updates dont update it immediately wait for other users experiences post update
5. Keep enough space on device which is help you device functionality smoother
6 Settings>developer option>Background process limit >choose no background process
7. Optimise your device often with device care application
8. Restart the device once in every two days.....
A. Wipe Cache Partition.
Steps to perform.
1) Turn off the device.
2) Press and hold the Volume Up key and the spower button.
3) When the Android logo displays, release all keys.
4) Press the Volume down key to navigate and select "Wipe cache partition".
5) Press Power key to select. When the wipe cache partition is complete, Select Reboot System.
6) Press the Power key to restart the device.
B. Reset App Preferences.
Settings >Apps> Tap on Top Right 3Dots and select Reset App preferences.
This can Help you little bit more.
But if unfortunately it won't work then last option is
3. "Factory Data Reset" but before that take proper backup.
Dear Samsung Member,
Greetings from Samsung Customer Support!
Please visit this mentioned link to resolve your device heating issue: https://www.samsung.com/in/support/mobile-devices/why-the-device-heats-up-during-use/
For further assistance, register your concern in Samsung Members Application (Open Samsung Members Application > Get help > Send Feedback > Error report/Ask questions).
Thank you for writing to Samsung.
Samsung Customer Support