I have just downloaded unity and saw that now it supports Visual studio code, I downloaded it and made it the default editor.
After trying to edit a script, it prompted
The issue here is that you haven't selected VS as your code editor preference (https://docs.unity3d.com/Manual/Preferences.html) . Once you do this, also install the Game development with Unity workload for Visual Studio