In your project settings you can select what compiler the engine should use. Normally it is set to automatically choose it. You can try out manually selecting it.
Question was, which I have as well. How do I tell UE5 to use VS2022 instead of VS2019 when creating a C++ Project. I do not have 2019 installed, nor do I want to at this point since I want to use the latest version.
One thing I’m guessing, which I’ll try out is to create a blueprint project and try to convert it.
[UPDATE]
I was able to make it work by downloading and compiling from the UE5-master branch and not using the pre-built binary from the installer.