Did you verify salesforce cli installation outside of vscode first?
You can do that by opening terminal wiring sf -version, if it doesn't recognise this command, that means to haven't set salesforce cli in your path variable.