You will need to install the correct MSVC version for ue5.1
Usually it MSVC 14.34 from your visual studio installer. (as mentioned here
And make sure you have the correct windows sdk for your exact windows 11 build version(that you can check with start>search winver)
You might also want to uninstall any old visual studio left over.
Any third party plugin that are not from epic will require a package with visual studio even if you dont have any cpp files.