brand new iPhone XS seems to run out of juice quite quickly - when should I charge it?
Apple has a guide on how to maximize the performance of your battery.

Here are some of the key points:


Avoid extreme temperatures
Remove certain cases during charging(may cause excessive heat)
Store the device half-charged when storing long-term without usage
You may also want to check battery settings for what apps are using your battery and maybe disable background app refresh/location services for those apps
Make sure your display brightness isn't too high and enable auto-brightness if you want


Additional tip(not included in article): Keeping your device between 20%-80% helps your battery last longer. The website says keeping your device up to date also helps, but in many cases updating older devices reduces battery life.(the one exception to this is iOS 12 which actually improved performance and battery life)