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.
Most Elgato Gaming Devices Can't Use HDR Colors
If you want to use the Xbox One X with most Elgato Gaming devices, you must turn HDR off.
However, the latest version of Elgato Game Capture 4K60 Pro can passthrough HDR colors. See this article for more details:
HDR Video is Supported with New Hardware and Software
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