If you're going to use Visual Studio to write your code then there is no reason to follow the step for doing it from the command line. VS already handles all this. The steps are for those folks who don't want to use, or cannot use, the IDE.
The problem you are running into is that the IDE provides intellisense and background compilation to guide you down the path of success. But that requires that you are actually using the IDE for what it was designed for. In your specific case it appears that you simply opened the VB file in the editor. Because you aren't providing any of the contextual information the IDE needs to help you along it is going to flag everything with warnings and errors. Since you aren't using any of the editor features of the IDE you can ignore all of them. Some may be valid and some may not but the IDE won't be able to tell the difference. However you might as well just use Notepad++ or similar text editor instead since you're wasting your time loading up the IDE just to edit a text file.
After you've typed in all the code (again completely ignoring all the warnings and errors the IDE is giving you) then you can compile the code from the command line to see what is actually wrong. Since the IDE has no context it isn't going to be able to sync up to this. You'll then have to switch back to the IDE and fix the errors one by one, returning to the command line and recompiling after each change to get the updated list of issues. The IDE will unlikely never get to the point where it doesn't flag your code with errors/warnings because it doesn't have the context it needs.
The recommended approach is to create the project in VS. You'll then have the full power of the IDE to help you. This includes the background compilation that will tell you quickly when things are wrong, quick actions to fix your code and resolve common errors like unresolved identifiers, ability to auto-import references and namespaces (which you have to do by hand otherwise), etc. There really is no reason not to use the IDE if you have it installed.
To migrate over to using the IDE you will want to open VS and then create a new project (Windows Forms App (.NET Framework) and ensure the selected language is VB. It'll auto generate all the code that was listed in the instructions you were following. After that you'll notice all the errors will be resolved in the IDE. At that point you can compile from the IDE (or command line) and it should be fine. As you continue adding code the IDE will properly reflect compiler errors/warnings and offer to help you fix errors as you go along.