Chosen Solution

Not all the time but it does it enough for me to be worried about it. Like, if the phone screen has been off and I press the power button to wake it, it’ll do that

It sounds like a defective screen. This could be caused by a drop or other form of impact. Replacement screens for the iPhone X are very expensive so it’s a bit prohibitive to just order one up to test it out. However, if you wanted to go that route, check out this guide to see what’s involved in replacing a screen yourself. Otherwise, you could consider dropping by a shop to have them try a replacement screen to see if this solves the issue or not.