Make sure you installed all those checkboxes first:
And that your windows sdk matches with your windows exact version.
More detail on: Setting Up Visual Studio Development Environment for C++ Projects in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community
