A common misconception is that you don't want to overcharge your phone because it will actually hurt the battery. While there is a lot of debate about this, Apple has implemented a fail-safe to combat any issues from overcharging. The iPhone X does have Optimized Battery Charging (iOS 13 or later) which is located under the Battery tab in the Settings. If you toggle this on (which it should be on by default) your phone will learn your charging routine. Toggle the option on so that your battery's chemical life lasts longer.