How to only compile single module of UE instead of compile whole engine?

Can you say more detail please? I am still don’t know how UBT work. How to create a new target? Where should I create a new target? In a normal C++ project or project that build whole engine? I have tried at a C++ project, by copy an engine module’s source code to the project’s source folder and add build module target by using “ExtraModuleNames.AddRange” statement at “.Target.cs” file, but error occurred when I tried to build. Then I turned to modify the build setting of project that build whole engine by delete the statement “bBuildAllModules = true;” and “ExtraModuleNames.Add(“UnrealGame”);” at “UnrealEditor.Target.cs” file, but when I started to build the project “UE5”, UBT still started to compile every module.