Need help making C++ project

I have UE 4.21.1 and VS 2017. Whenever I try to make a C++ project it won’t work. It says “unreal engine could not be compiled. try rebuilding from source manually”. I’m not sure what to do. I can make blueprint projects but not C++ projects.

Run the “Visual Studio Installer” app and make sure you have all the required dependencies to build “C++ Desktop Applications”