Please use "pip show opencv-python" in the VSCode terminal to check where the module "cv" is installed, then click on the Python environment in the lower left corner of VSCode and change it to the environment where the module "cv" is installed.

Run:

More reference: Environment in VSCode.
I think there are more than one python installation in your machine one must be installed outside the VS code and other one installed in VS code.
And your OpenCV is installion is not mapped with python installation that uses vs code .
You need to configure the pyhon version in the VS code that is mapped with OpenCV.
- To check all the python installation in your machine using following command in the cmd prompt
where python
Then check vs code is mapped with which version of python using below statment in the python file
import sys
print(sys.executable)
If the python path is different than openCV installed then need change by following below image
