For two days now, I've been having a rather strange problem.

The MonoBehaviour class isn't recognized by VS Code, with the following error:
Error while loading [...]: Exception thrown: System.TimeoutException: The operation has timed out.
I've already tried executing Edit > Preference > RegenerateProjectFiles, but to no avail.
I also deleted the "Library" folder as suggested by some users, with disastrous results, as it completely broke the game (the problem was solved by reinserting the old "Library" folder).
The only thing I haven't tried is increasing the "TimeOut" setting, which many have recommended, but I'm not sure how to do it and I'm afraid of damaging VSCode.
The only issue I'd like to point out are that the version of Unity on this PC is old (2023, I believe). However, I don't think that's the problem, since everything was working fine until the other day, and before this happened, the PC shut down on its own (with Unity open) due to some Windows updates.
But there's another problem.
Some people who deleted the "Library" folder and complained that their game was "broken" have been told that there might be something wrong with the project itself, because the folder only contains temporary, standard information that's generated each time the project is launched, so it shouldn't affect the game files.
I wanted to know if anyone could shed some light on this, and since I'm here, I wanted to ask if, when I update Unity, I should install one version at a time, or go straight to the latest versions. Maybe this is a silly question, but I'm terrified I might lose my game by updating to a version that's too recent.