Basically you need to reboot your iPhone X either by turning it OFF, waiting for a couple of seconds before powering it back on, or by using the three-button combo described here to quickly restart it. After the respring you have to enter the device’s Passcode and the status bar should be back at the top of the screen. Yes, this is a temporarily fix because the status bar can hide back anytime.
Apple hasn’t provided a patch for this bug in the most recent iOS 11.2 release and it seems that we have to wait a little longer for a permanent fix. Whenever we replicated this issue, we noticed that the status bar disappeared when returning to the Home screen from the Control Center view. This problem could be tied with the fact that the iPhone X hides the battery percentage in the status bar, because of lack of space and reveals it only when you unveil the Control Center!
Fact: The hiding status bar bug also occurred earlier this year, when several iPhone 7 models running iOS 10.3 have been plagued by this issue!
Related: You might be also interested in reading about the iOS 11 glitch that hides the remaining battery icon from the iPhone X status bar.