Here are the steps to close all apps on an iPhone XR:
Swipe up from the bottom of the screen and hold your finger in place for a moment until the app switcher appears. You should see all of the apps that are currently open on your iPhone XR.
To close a single app, swipe up on the app card that you want to close.
To close all the apps at once, swipe up on any app card with two or three fingers. You can also swipe up on multiple app cards at the same time to close several apps at once.
Keep swiping up on the app cards until all the apps have been closed.
Once you have closed all the apps, press the Home button to return to the Home screen.
That's it! You have now closed all the apps on your iPhone XR. Note that closing apps in this way can help conserve battery life and free up memory, but it's not always necessary as the iPhone's operating system automatically manages app activity in the background.