code: private function askForPassword(string $label, InputInterface $input, OutputInterface $output): string
      {
          $question = new Question($label);
          $question->setHidden(true);
          $question->setMaxAttempts(3);
  
          /** @var QuestionHelper $helper */
          $helper = $this->getHelper('question');
  
          return $helper->ask($input, $output, $question);
      }
docs: Asks a question with the given label and hides the input.