The Xbox One X offers output at up to 4K resolutions (3840 x 2160).
The Xbox One X also offers HDR color output as an option.
Most Elgato Gaming Devices Can't Use 4K video
Most Elgato Gaming devices cannot passthrough, capture or stream 4K video. For those devices, you must set your Xbox One X to 1080p output, or less.
The only device that can capture 4K video is the Elgato Game Capture 4K60 Pro.
Elgato Gaming Devices Can't Use HDR Colors
If you want to use the Xbox One X with an Elgato Gaming device, you must turn HDR off. No Elgato Gaming device can use HDR.
For more information about the Xbox One X and HDR, please see this article from Xbox.com:
Troubleshooting 4K and HDR on Xbox One X and Xbox One S