Follow this tutorial here. “Building Unreal Engine from Source | Unreal Engine 5.3 Documentation”
If something is wrong remember to post on the answehub. It’s pretty helpfull over there! Hope you get it working. (Also, Why do you want to build the source? You can download the program from the launcher.)