Unity and Visual Studio can't be connected

I upgraded the Unity version from the 2021 version to the 2023.2.3f version. And I opened the ongoing project to a new version, but the connection between Unity and the visual studio was not working properly as all the scripts were broken.
Mono Behavior appears white, and Unity’s material types, such as GameObject, appear white.

I tried all the solutions I got from my internet search, including updating my visual studio, checking support for Unity in my visual studio, and checking my visual studio connectivity in Unity, to no avail.

I’m deleting and reinstalling the visual studio itself, what should I do if it doesn’t work?

Maybe this wille help you:
Unity - Manual: Visual Studio C# integration (unity3d.com)