A project is not being created in Unreal Engine 5

I have sort of the exact same problem with 14.32, Unreal detects 14.32 but refuses to use it. And it doesn’t want to use other versions if not installed.

If that can help, the error is line 551 of MicrosoftPlatformSDK.cs:

else if (VersionNumber.TryParse(CompilerVersion, out VersionNumber? ToolChainVersion))
{
	ToolChain = SelectToolChain(ToolChains, x => x.ThenByDescending(x => x.Version == ToolChainVersion).ThenByDescending(x => x.Family == ToolChainVersion), Architecture);
	if (ToolChain == null || !(ToolChain.Version == ToolChainVersion || ToolChain.Family == ToolChainVersion))
	{
		DumpToolChains(ToolChains, x => x.ThenByDescending(x => x.Version == ToolChainVersion).ThenByDescending(x => x.Family == ToolChainVersion), Architecture, Logger);
		throw new BuildException("Unable to find valid {0} toolchain for {1} {2}", ToolChainVersion, Compiler, Architecture.ToString());
	}
}