I have seen plenty of used iPhone X and XS that say the phone works fine except Face ID. This made me quite curious as to why most iPhone X or XS have their face corrupted? Apparently it's a depth camera — are depth cameras more susceptible to faults?
The simplest explanation is that they've had their screens broken and the replacements weren't done by Apple themselves.
The FaceID [and TouchID] secure enclave chips cannot be replaced by anyone other than Apple. If they are in any way disturbed by a third party, they will cease to function.
This is a security measure.