How to only detect the opening and closing of door sensor once
As often, the answer to this question is “Implement a ‘Finite State
Machine.’”. In this instance, you need at least three distinct
states:


ARMED: the buzzer is not active, but it is only a matter of time...
ON: bzzzz... bzzzz... bzzzz...
STOPPED: the user has stopped the alarm.


Each of your alarms should have a start time and a stop time (say, two
minutes after the start time). Then, the possible state transitions are:


ARMED → ON: when we hit the start time of an alarm
ON → STOPPED: when the user stops the alarm
ON → ARMED: when we hit the stop time of the alarm
STOPPED → ARMED: when we hit the stop time of the alarm


Notice that, once the user stops the alarm, the only way for the buzzer
to start buzzing again is by going through the transitions STOPPED →
ARMED → ON. The first transition happens at the alarm's stop time,
whereas the second one happens at the next alarm's start time.

You did use a kind of state variable in your code, but the problem is
you failed to realize that ARMED and STOPPED should be distinct
states. If you fuse these states together then, when the user stops
actively “stopping” the alarm, and if it's still start time, the
system transitions immediately back to the ON state.