Hello nquintana,
Welcome to Apple Support Communities.
It sounds as your iPhone XR is getting really hot while charging and this is a recent event, correct? We're here to help you take a look in to that!
Before going into software troubleshooting, a backup of the data on the device would be encouraged to iCloud or iTunes:
How to back up your iPhone, iPad, and iPod touch
Let's start with doing a complete restart of the iPhone XR and use the recommended Apple brand adapter and lightning cable that came with the iPhone XR to test charging temperature. Here is an article on additional steps to follow to help resolve this issue:
Restart your iPhone
Keeping iPhone, iPad, and iPod touch within acceptable operating temperatures
If the issue persists, please don't hesitate to post a reply on the thread!
Cheers!