Arduino KeyPad wrong password

Hello, I am new in Arduino and i have a question for a school project.
I’m making a password checker with a green LED, a red LED and a buzzer.
So far I have made that as soon as you type in the correct password a green LED turn on and you hear a high tone from the buzzer. When the ‘*’ key is pressed it restarts so you can type in the password again, also the Red Led turns on and you hear a low tone from the buzzer. Now I’m wondering how i can fix the code so that the Buzzer makes a low sound whenever I type in a wrong code on the KeyPad.
This is the code, thanks in advance!

#include <Keypad.h>

int ledRood = 5;
int ledGroen = 3;
int buzzer = 4;

char* password = "2019";
int positionCounter = 0;
const byte rij = 4;
const byte kolom = 4;

char keys[rij][kolom] = {
  {'1', '2', '3', 'A'},
  {'4' , '5', '6', 'B'},
  {'7', '8', '9', 'C'},
  {'*', '0', '#', 'D'}
};

byte rowPins[rij] = {6, 7, 8, 9};
byte colPins[kolom] = {10, 11, 12, 13};

Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rij, kolom);

void setup() {
  Serial.begin(9600);
  Alarm(true);
  pinMode(ledRood, OUTPUT);
  pinMode(ledGroen, OUTPUT);
  pinMode(buzzer, OUTPUT);
  Serial.println("Voer uw pincode in:");
  Serial.println("Druk op * op te resetten");
}

void loop() {

  char key = keypad.getKey();
  if (key == '*')
  {
    tone(buzzer, 100);
    delay(500);
    noTone(buzzer);
    positionCounter = 0;
    Alarm(true);
  }
  if (key == password[positionCounter])
  {
    Serial.println(key);
    positionCounter ++;
  }
  else
  {   
    Serial.println("verkeerde code");
  }
  if (positionCounter == 4)
  {
    Alarm(false);
  }
  delay(100);
}


  void Alarm(bool AlarmAan)
  {
    if (AlarmAan == true)
    {
      digitalWrite(ledRood, HIGH);
      digitalWrite(ledGroen, LOW);

    }
    if (AlarmAan == false) {
      digitalWrite(ledGroen, HIGH);
      digitalWrite(ledRood, LOW);
      Serial.println("Pincode correct!");
      tone(buzzer, 800);
      delay(100);
      noTone(buzzer);
      delay(30);
      tone(buzzer, 800);
      delay(100);
      noTone(buzzer);
      delay(30);
      tone(buzzer, 800);
      delay(100);
      noTone(buzzer);
    }
  }

I'm wondering how i can fix the code so that the Buzzer makes a low sound whenever I type in a wrong code on the KeyPad.

Do you mean that you want the buzzer to sound when an incorrect individual character is entered or when an incorrect whole code is entered ?

I mean when a whole 4 digit code is wrong.

So far I have made that as soon as you type in the correct password a green LED turn on and you hear a high tone from the buzzer.

At the moment your program checks that each character matches the corresponding password character. I think that it would be better to accept 4 characters, whether they match or not, then test whether all 4 match or not.

Doing it that way would make it easy to test the entered characters against the password using a for loop and do different things depending on whether all 4 matched or not.