How to make a RS latch?

Then, you should have variables named zone1Pin, zone1State, etc.

You 're right, but instead I named them input1, input1State, input2, input2State,... and it's 3 zones not 4 like I mentioned earlier.

Is LED 4 the buzzer?

What type is previousMillis and interval? What do they represent?

It appears that you can only shut the buzzer off after some period of time (interval). Why is that?

Yes, for now the buzzer is represented by a LED that why I named it led4.

I don't want a continuous sound for the buzzer I want it to "blink" like a LED.

I use the same code for the LEDs to blink:

int led1State = LOW; 
int led2State = LOW;
int led3State = LOW;
int led4State = LOW;

long previousMillis = 0; 

  
long interval = 800;
void loop3(){
  input3State = digitalRead(input3);

  if (input3State == HIGH) {    
  
  unsigned long currentMillis = millis();

  if(currentMillis - previousMillis > interval) {
  previousMillis = currentMillis;  

  if (led3State == LOW)
  led3State = HIGH;
  else
  led3State = LOW;

  digitalWrite(led3, led3State);
  }
 }
  else {
  digitalWrite(led3, LOW);
  }
}

The blinking is fine, it's just this reset which is not working.