You are looking at the wrong documentation. That's for Visual Studio, not Visual Studio Code. They are annoyingly similarly named, which can be confusing, but they are two completely different IDEs.
The correct docs for VS Code is here:
https://code.visualstudio.com/docs/languages/python
There is a section for running Python codes on the Terminal:
https://code.visualstudio.com/docs/languages/python#_run-python-code
You can use the standard Python console.
- Install the Python extension for VS Code
- Setup and select the correct Python environment
- Open the Command Palette then "Python: Select Interpreter"

- Next, highlight the line you want to run, then right-click
- Select the Run Selection/Line in Python Terminal

- It should open up a Terminal panel and run your code in Python console

- You can then keep right-clicking > Run and it will execute on the same session
There's also an option to run the entire file.
See the Run Python Code section of the docs for more info.