Chosen Solution

Please Help!!! Just got a smashed up iPhone X for free, it’s fully functional except the screen is smashed, I took the screen off and the ambient sensor has broken off the earpiece! How do I fix this without losing Face ID????

I’m not an expert on iPhone X screen replacements but my understanding is that FaceID is like TouchID, only Apple or an authorized repair shop can make those repairs and maintain the FaceID function. Considering you got the phone for free, that would still be a bargain. Or you could replace the screen and sensor flex yourself and live without FaceID.