Hi and Welcome to the community.
The instructor uses Visual Studio which offers better facilities for this sort of thing over VS Code. While code is fine as an editor, for C++ it does lack somewhat. I personally use Rider which is a paid for tool and superior to both.
The only thing I am aware of is the option to regenerate project files which is in one of the menus inside the Unreal Editor.
Give that a try. You may also need additional plugins for C++ but again I can’t tell you what they are as I’ve never gotten code working to my liking with C++.