I would recommend giving this troubleshooting article a try: https://www.samsung.com/us/support/answer/ANS00076952/
For some reason, my s10 keeps getting hot. I can be doing all of the above, or doing nothing at all & it keeps getting too hot to touch. My s10e NEVER gets hot.
Check your battery usage page. See what could be causing strain on the processor.
Go to settings>device care>battery>battery usage and look for an app or service that consume the most %