I've had the same issue with my iPhone X since upgrading to iOS 12.
Since updating to iOS 12 (and 12.1 beta since then which is just as bad) I've noticed:
1. Auto-focus is not as accurate as on iOS 11.
2. There is significantly more aggressive noise reduction / image smoothing which looks very poor, certainly much worse than iOS 11.
3. The phone struggles under lower light conditions much more than it did on iOS 11.
4. Bright lights (e.g. a cars headlights) cause very poor results both with HDR enabled and disabled - a problem I did not have under iOS 11.
At first I thought it was just a dirty lens or I was doing something wrong but I'm now convinced it's a software bug in iOS 12 and 12.1 beta.