We can't diagnose this kind of issue remotely.
You can try a forced restart of your iPhone X:
Press and quickly release the Volume Up button. Press and quickly release the Volume Down button. Then, press and hold the Side button until you see the Apple logo. When it appears, release Side button, wait for your iPX to restart, then test it.
If the line is still there, since your device is still under warranty, have it inspected at your most convenient Apple Store or Authorized Service Provider. They will give you all the available options:
Apple - Find Locations - Location Selector
Regards
Giulio