There has been some issues with using the latest MSVC version, as mentioned in the third line you’ll need to use this version instead 14.38.33130
Open visual studio installer and modify your visual studio 22, go to individual component and install MSVC 14.38
Next you have 2 options, either uninstall any other MSVC version so it’s forced to use 14.38 or tell the compiler which version to use, you can do this by going to Documents\Unreal Engine\UnrealBuildTool if you don’t have this folder create it.
Inside add or modify BuildConfiguration.xml
Make your file look like this if you already have your own add the compiler version restriction.
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<WindowsPlatform>
<Compiler>VisualStudio2022</Compiler>
<CompilerVersion>14.38.33130</CompilerVersion>
</WindowsPlatform>
</Configuration>
I hope this helps.