Hi @sarah98397,
That cable seems to have something to do with the compass, the phone case cover auto lock screen, or possibly the NFC function. It's soldered onto the wireless charging coil and provides the connector going to the motherboard. You may be able to buy that cable separately from the charging coil, but I wouldn't recommend it, as removing and reinstalling it requires a delicate hand with a soldering iron; I know I tried it once myself but ended up burning up the flex cable by using a soldering station I wasn't familiar with. Much easier to just buy one already assembled. Unfortunately, the one iFixit sells requires soldering, so I wouldn't recommend that one. Here's an example of the one you want with the two parts already soldered together.
Apple :: iPhone Repair Parts :: iPhone XR Parts :: iPhone XR Wireless NFC Charging Flex
You'll have to remove, at a minimum, the motherboard and the battery to get to the charging coil for replacement. I couldn't find any iFixit style guides for your phone, but there's a YouTube video that seems to be pretty well done and has all the information you need to get the job done.
Here’s how to replace iPhone XR wireless charge coil - YouTube
Hopefully that'll get you going! Let us know how it turns out.
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
1
crwdns2947414:01crwdne2947414:0
My dad did the same thing with my phone, i left him alone 30 minutes and told him to not break anything. He demolished the cable behind the battery and the wireless charging is scraped but i think it works, but he completely tore the cable, i can’t find what part i need to buy😭
crwdns2934271:0crwdnd2934271:0 Sarah crwdne2934271:0