State variables and millis help.

You need a function to shut off the alarm when you release the button.

However, the way you've debounced your button is confusing. There's no need for a lastButtonPushed variable, just test the state of the button itself, like this:

  if (lastButtonEnterState == LOW){
    AlarmTest();
  }
    else {
      lastButtonPushed =0;
      digitalWrite( buzzerPin, LOW ); // <== Turns off buzzer when the button is off.
    
  }