AFAIK UE5 doesn’t support versions of visual studio before VS2015 (included), so I doubt that it recognize the old versions that you have installed.
Did you select all the recommended packages in the visual studio installer 2022? (like game development C++, net framework and other stuff?)