The iPhone X has a better display with higher pixel density which gives more clarity.
The resolution on the XR is lower but the screen is actually larger (6.1 inches).
The iPhone X has 2 rear facing cameras (great for zoom) while the XR only has 1.
iPhone X is powered by an A11 bionic chip but the XR was upgraded to the A12 so it shows an improvement in performance.
The iPhone X and iPhone XR both have FaceID.
The iPhone X has a standard nano SIM while the iPhone XR features dual SIM which means it has a nano SIM and an eSIM. An eSIM is a digital SIM that allows you to activate a cellular plan from your carrier without having to use a physical nano SIM.