Normally, iPhone X features 19.5:9 aspect ratio which is not quite good for watching videos when many contents out there is at 16:9 ratio. Such contents covers a 5 inch display screen.
Now, the latest YouTube update for iOS device particularly the iPhone X, allows you to use the screen fully. You will only loose a bit from the top and bottom, while the sides loose bits due to the rounded corners.
To make this happen, all you have to do is just to pinch the gesture to fill up the screen. You can download the new YouTube version 12.43 on appstore.