See c++ - Debugging with command-line parameters in Visual Studio - Stack Overflow how to do this.
OK, I just read again and you try to use vscode as a beginner on macOS. Please use Xcode as this makes debugging and helping a lot easier. See how to debug program with argument vector in Xcode - Stack Overflow