Hello,
Welcome to Microsoft Q&A!
If you only use Windows.Graphics.Capture API in c# UWP, as the document said, Windows 10 version 1803 is the lowest version to use Windows.Graphics.Capture Api. But this sample demonstrates how to use the Windows.Graphics.Capture APIs in a Win32 application instead of UWP application and it mentions it uses new APIs only available in Windows 10, version 1903 (SDK 18362) or later, the CreateForWindow is the API from Win32 instead of UWP, so you need to run the sample on Windows 10 version 1903 instead of 1803.