I had the same problem with 2 iPhone X. After purchased back cover replacement from eBay. The phone keep turn off and on every 3-5 mins. [br]
No matter what I do is never fix the problem.but took me 2 hours then I pound the problem is. I install back the old back cover from the original iPhone X and stop doing that. Work normal again. So I have to send it back to the seller , they send me the new one is work perfectly. That all. Good luck.