The charging cable of Apple's mobile phone is universal, and the charging cable used by xr and 6 models is the same, so there is no problem at all. It's just that xr phones support wireless charging, while the 6 does not. So if you use a wireless charger, it is not universal. Now on the market, the charger of Apple mobile phone also has a adapter, which can also be universal.
Yes, they are both Apple data cables, and the interface is the same to use.