You may not have numpy installed on the version of python you are running.

Try this:

import sys

print(sys.version)

Is the printed version Anaconda? If you installed Anaconda python, it should come with numpy already installed. If it turns out to be another version of python you are accessing inside Visual Studio Code that doesn't have numpy installed, then that's what you need to fix.

The version of python that is called depends on which version of python comes up in your PATH variable first. Type into a terminal: echo $PATH.
The output should look like this with Anaconda bin first:
/Users/jlzhang/anaconda/bin:/usr/local/bin:/usr/bin:/bin

If you do not have Anaconda bin first, you can add this to your ~/.bashrc file:
echo

# Use Anaconda python

export PATH="/Users/jlzhang/anaconda/bin:$PATH"

Restart a terminal and Visual Studio Code and see if you are now running Anaconda python.