Board won't let me turn led pin an and off while controlling relays

First of all, I must say hello to all forum mebers!
I have a problem, i'm trying to make a room "weather" controller using arduino. Just testing individual components at this moment before I start final assembly. I just tested controlling some relays and it works well, then tested turning a led on pin 13 on and off using a debounced push button, and that works well too, but when merge it together and try to control the led with the button while relays are beeing switched on and off it won;t work.

Here is the code:

/*
  Test code relay board switching and led + button,
  r1=12,r2=7,r3=4,l1=13,b1=2.
 */

int relay1 = 12;
int relay2 = 7;
int relay3 = 4;
const int buttonPin = 2;
const int ledPin = 13;

int ledState = HIGH;         
int buttonState;             
int lastButtonState = LOW;

long lastDebounceTime = 0; 
long debounceDelay = 50; 

void setup() {                
  pinMode(relay1, OUTPUT);  
  pinMode(relay2, OUTPUT);
  pinMode(relay3, OUTPUT);
  pinMode(buttonPin,INPUT);
  pinMode(ledPin,OUTPUT);
  
  digitalWrite(ledPin, ledState);
}

void loop() {
  int reading = digitalRead(buttonPin);
  if (reading != lastButtonState) {
    lastDebounceTime = millis();
  } 
  if ((millis() - lastDebounceTime) > debounceDelay) {
    if (reading != buttonState) {
      buttonState = reading;

      if (buttonState == HIGH) {
        ledState = !ledState;
      }
    }
  }
  
  digitalWrite(ledPin, ledState);
  lastButtonState = reading;
    
  // RELAYS OFF
  digitalWrite(relay1, HIGH);   
  delay(2000);               
  digitalWrite(relay2, HIGH);   
  delay(2000);               
  digitalWrite(relay3, HIGH);   
  delay(2000);  
  // RELAYS ON
  digitalWrite(relay1, LOW);    
  delay(3000);               
  digitalWrite(relay2, LOW);    
  delay(3000);
  digitalWrite(relay3, LOW);    
  delay(3000);     
}

Another question would be why the relays are on when the pin is LOW and off when pin is HIGH? I'm using a cheap 4 relay board from China.

Another question would be why the relays are on when the pin is LOW and off when pin is HIGH? I'm using a cheap 4 relay board from China.

My guess is that the relay board input is optically isolated. The LED in the opto is wired from V+ and takes a low to connect it to ground to turn on the LED to turn on phototranistor in the opto.

Thank you ground for the reply.
Anyone has any input on the main problem I,m having?

but when merge it together and try to control the led with the button while relays are beeing switched on and off it won;t work.

Perhaps it's that lllloooonnnngggg time between reading the switch state that is the issue. Are you holding the switch down for 15 seconds?

Once again, the blink without delay example needs consideration.

You are using millis() to manage the timing for debouncing. Use the same approach to replace all the delay() functions.

...R