What is the best way to compile C++ Code.

Hi. I’m programming with Unreal for round about 4 months. I started only with Blueprint but now I wanted to start with C++. I looked a few tutorials but in most of them the way how to compile isn’t explained and I didn’t found an answer what is the best and most efficient way to compile and how this way works. I already live compile but I think this isn’t the only way.
I am using Unreal Engine 5.0 and Visual Studio 2019.Can somebody explain it to me