I understand that your iPhone X is getting hot, and I'm happy to provide some help.
Check out the information in the article below about keeping your iPhone at an appropriate operating temperature:
Keeping iPhone, iPad, and iPod touch within acceptable operating temperatures - Apple Support
Thanks for using the Apple Support Communities. Cheers!