I don’t have much experience specifically on iPhone X boards, but when both cameras are involved it’s usually a board issue as what the two have in common is just power lines. Thus a rear camera replacement is a risky replacement that might not be worth attempting considering the camera price. In my opinion the potential benefit vs. the expense goes against a DIY approach as in the end you’ll probably need handing your phone to a microsoldering Pro in any case.