Missing modules whenever I add C++ code to a project

I am getting this missing modules error whenever I add C++ into a project
image
I have tried building the code in Visual studio but get this error:

1>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command ““C:\Program Files\Epic Games\UE_5.3\Engine\Build\BatchFiles\Build.bat” UE5_3_testEditor Win64 Development -Project=“G:\Unreal Stuff\UE5_3_test\UE5_3_test.uproject” -WaitMutex -FromMsBuild” exited with code 6.
1>Done building project “UE5_3_test.vcxproj” – FAILED.

I have also tried deleting all the visual studio files in the project directory and re-generating them, changing the engine version on an existing project and using another version from scratch all have failed.