I would make a fresh install and follow this guideline : Setting Up Visual Studio 2022 for Unreal Engine 5 | Community tutorial
I would make a fresh install and follow this guideline : Setting Up Visual Studio 2022 for Unreal Engine 5 | Community tutorial