[SOLVED]
Unreal Version: UE5.0.2
Launch the Visual Studio Installer → Click on Modify-> Click on Individual Components → And scroll down until you fine MSVC v143 - VS 2022 C++ x64/x86 build tools(v14.31-17.1)
As shown in the image, after doing this it worked for me, initially, I had done it with ARM build but that was for mobile devices so make sure you select the right one.
