Hi Trish-S,
It sounds like your iPhone XR froze when attempting to restore it to the factory settings. We'd like to help.
Just to confirm, did the iPhone restart after selecting to restore it, and when it turned back on, it got stuck on the Apple logo and progress bar? If so, the steps under the "If your device turns on but gets stuck during start up" part of this page may help:
If your iPhone, iPad, or iPod touch won't turn on or is frozen
If those steps don't correct the issue, please see the "If you need more help" section of the above link as well.
Thank you!