Adjusting exposure or using HDR will help some, but what you are seeing is the dynamic range limitation of the sensor (the ability to capture a range of shadows and highlights). The XS appears to improve on this, but I don’t know if it’s through better HDR software, sensor improvements, or both.
Dynamic range is one of the areas where larger sensor cameras still have an advantage. A full frame DSLR or mirrorless camera would easily capture the photo you want, and even my six year old Olympus OMD with its m4/3 sensor (half the size of full frame) will capture more highlight and shadow detail for a scene like this.
One trick that might help is to use a tripod or other stabilizer to take multiple photos of the scene at different exposures, and then combine them using HDR software. This essentially what HDR mode does automatic, but the manual approach will let you capture more samples with a wider exposure range that you can combine later.
The long time rule of digital photography has been that you are better off slightly overexposing, because it’s usually easier to recover highlight detail than shadow detail, but with such a small sensor you can’t recover much highlight detail even when shooting raw... so you can’t push the iPhone X sensor too much. Based on the comparisons I’ve seen, better HDR is the most compelling reason to upgrade to the XS. I probably won’t bother since I have my Olympus and Nikon gear, but it is tempting.