This is the type of problem I've encountered on an iPhone 5 (this year), it's not something that's okay on an XR. If it doesn't respond to restart (triple click lock, I think you have to hold to turn on again) or power off (hold lock and swipe), then most likely your only option is to wait for the battery to drain itself. Even if it does work properly again after this I would take it to Apple and ask for a replacement, there will be underlying problems in a phone this new, but I don't expect they will do much for you.
I don't actually have this phone, so I'm not familiar with the software. Sorry I couldn't be of more help.