A phone will warm up with usage however it shouldn't to the point it becomes uncomfortable to use or you get a pop up warning message.
Make sure all your apps and phone's software is up to date.
Your phone has a diagnostic tool in your Samsung Members app.
Please try these generic troubleshooting tips.
Daily Driver > Samsung Galaxy s²² Ultra 256Gb in Phantom Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help.