From what I can see, the two biggest differences are the processor and the build quality. Additionally, some of the extra cost is the better LTE modem and the FaceID sensors. Last, there is the fact that Microsoft was aggressively discounting their phones in an attempt to build market share, as well as it being a 2+ year old phone, whereas Apple has always had a premium price tag. The issue with it being a 2+ year old phone is that the cost of the flagship phones have increased over the last several years; for example, the iPhone 6s, which was released close to the same time, was only $649 (for the cheapest version) at release, the same price as the 950 XL at release.
The processor in the iPhone is faster than many laptops, and much faster than the processor in your Lumia, which is now 2 (and almost 3) generations old. Also, the plastic frame of the Lumia is very inexpensive compared to the Stainless Steel frame of the iPhone.
The iPhone X is expensive, even for a flagship phone. I find that to typically be due to two factors -- one is the software (and warranty) support and the second is because of the FaceID costs (and the so called "Apple Tax" could also be included). The only other real "flagship" that currently also offers 3 years of software updates, the Pixel, is also $100 or so more expensive than other similarly equipped flagships -- and is missing things like the wireless charging, stainless steel, and dual cameras of the iPhone.
As for better, the three things I can somewhat see are the higher resolution on the screen and camera and the removable battery. If I'm missing something, let me know. The screen is offset a bit by the quality of the Apple display, being compatible with DolbyVision and HDR10, and also having the 3D touch ability. Most reviewers have also found having a higher resolution on photos is typically makes little difference, short of trying to make large prints (larger than 8x10) of your photos; instead the focus is more on color accuracy, slow motion video, and better low light photos -- and the iPhone cameras are rated among the best smartphone cameras. As for the replaceable battery, the trade off is that you gain water resistance on the iPhone.
Only you can decide if the price on the iPhone X is too high -- you can get most of the same features on the iPhone 8 or 8 Plus, if you don't feel the X is worth the extra money. You can even fall back to the iPhone 7 Plus, and still get most of what you'll find on the iPhone X, but at a much better price.