This is an issue I've been having almost identical to this post from 2015 where some of the fix issues (such as downloading Tools for Unity 2015 when there is no modern counterpart I can find on the marketplace) seem outdated.
My situation is also unique in that I am attempting to edit scripts from an imported unity project, as I'm now on a new PC and needed to continue my Udemy coursework on a new install of Unity. I downloaded the project directly from the Udemy course's resources, which was admittedly on a much older version of Unity I didn't feel comfortable using, so I upgraded it to a newer version (2020.3.13f1).
I'm not sure whether this is an issue with the upgrade, importing projects, or what really. I should also mention that my version of Visual Studio was downloaded from within the Unity Hub along with the install of the Unity Engine itself, so I'm not really understanding why it wouldn't see even newly created scripts as tied to Unity.
Error message within Unity when attempting to open a script:
Win32Exception: ApplicationName='C:\Users\amoll\OneDrive\Desktop\Unity Projects\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\Library\PackageCache\com.unity.ide.visualstudio@2.0.11\Editor\COMIntegration\Release\COMIntegration.exe', CommandLine='"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.exe" "C:\Users\amoll\OneDrive\Desktop\Unity Projects\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8\07-Glitch-Garden-6fe3e396cd56c6c514191c37dbc1b42107ecf6f8.sln" "" -1', CurrentDirectory='', Native error= The system cannot find the file specified.
System.Diagnostics.Process.StartWithCreateProcess (System.Diagnostics.ProcessStartInfo startInfo) (at :0) System.Diagnostics.Process.Start () (at :0) (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Start() Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor.OpenWindowsApp (System.String path, System.Int32 line) (at Library/PackageCache/com.unity.ide.visualstudio@2.0.11/Editor/VisualStudioEditor.cs:323) Microsoft.Unity.VisualStudio.Editor.VisualStudioEditor.OpenProject (System.String path, System.Int32 line, System.Int32 column) (at Library/PackageCache/com.unity.ide.visualstudio@2.0.11/Editor/VisualStudioEditor.cs:224) UnityEditor.CodeEditorProjectSync.OpenProjectFileUnlessInBatchMode () (at <01e901910c5242498b7e69f6d2d8d500>:0) UnityEditor.CodeEditorProjectSync.SyncAndOpenSolution () (at <01e901910c5242498b7e69f6d2d8d500>:0)