For Vs 2022 you want to use my forked repo in
Visual Studio 2022 Preview is 64 bit and compiles and runs UE 5.0 EA approximately 20% FASTER - Development Discussion / Unreal Engine 5 Early Access - Unreal Engine Forums
This builds with VS 2022 Preview 4.1
The Github [ue5-main]/master does not work with VS2022
Thanks