Recommended development tools
Visual Studio 2022 is recommended to create Game Bar Widgets (including loading/editing any sample projects included in the SDK).
NOTE: there is a current known issue with Visual Studio 2017 project packaging.
Along with Visual Studio you need to have the "Universal Windows Platform development" workload installed as well as the 19041 version of the Windows SDK. You can use an older version if you like, but Windows version 19041 is required to run widgets anyway.
These components are provided as options in your Visual Studio installer. If you already have Visual Studio installed, you can reload the VS installer and modify the components you have installed.
If you create a new project, target the Windows 10 SDK version you chose above (likely 19041).