Here you have situation when every think is OK.
The Door is close
So when door is close Q3 and Q4 are ON and relay Ry2 is ON to.
And now when someone open the door the situation will look like this.
So we have High state on output of a first gate.
The red LED is ON.
HIGH state begins the process of charging the capacitor C3, so Q1 stay "ON" (buzzer is also ON) until C3 is fully charged. After that Q1/buzzer is off.
At the same time C4 is charging through R6, R7.
And when C4 charge to 0.5Vdd the output of a 3 gate gos to LOW state. And this will causes Q2 to ON and Ry1 also ON. So buzzer and Siren will be ON to.
The LOW state on output of a third gate will off Q3, Q4 (there will be some delay thanks to C6).
And LOW state on output off a fourth gate will locks the circuit in this state.
Until the door is close and reset button is press.