The iPhone X is a huge leap forward as far the iPhone line goes, but the batteries wear down just the same as the previous lines.
If your iPhone X is jumping charge percentages instantly, causing the phone to restart itself, or just going dead faster than when you bought it, you should bring it in to Mobile Device Doctors for a top quality replacement battery.
The replacement takes just one hour and walk ins are welcome, so come by between 10-7 on weekdays or 10-5 on Saturdays.