Integrating Visual Studio 2022 with Unreal Engine 5.1 can trip up some beginners since previous UE 4 C++ tutorials don’t use live coding . The information on this over the web is a bit scattered.
This tutorial will help you keep your sanity ( until the next change that remains undocumented in the official tutorials section )
https://dev.epicgames.com/community/learning/tutorials/XjvJ/unreal-engine-fab-ue-5-1-visual-studio-2022-installation-guide