control pins independently without delay()

Please edit that last post, highlight the code and hit the # icon.

Is this the sort of thing you want:-

int buttonPin = 2;
int buttonState = 0;
boolean LEDstate1 = false, LEDstate2 = false;
                       
int event1Pin = 9;                        
int event2Pin = 10;
long LEDonTime1, LEDonTime2;

void setup() {

pinMode(buttonPin, INPUT);

pinMode(event1Pin, OUTPUT);
pinMode(event2Pin, OUTPUT);

}

void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);

// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
   if (buttonState == HIGH) {  // turn both LEDs on for diffrent times
       digitalWrite(event1Pin, HIGH);
       digitalWrite(event2Pin, HIGH);
       LEDstate1 = true;
       LEDstate2 = true;
       LEDonTime1 = millis() + 2000;  // turn this on for 2 seconds
       LEDonTime2 = millis() + 3000;  // turn this on for 3 seconds
}
// see if we need to turn the LEDs off
  if((LEDstate1 == true) && (LEDonTime1> millis()) ) {
                       digitalWrite(event1Pin, LOW);     // sets the LED off
                       LEDstate1= false;
                       }
  if((LEDstate2 == true) && (LEDonTime2> millis()) )  {
                       digitalWrite(event2Pin, LOW);     // sets the LED off
                       LEDstate2 = false;
                      }
}

When a button is pushed the two LEDs will come on, one for 2 seconds the other for 3 seconds. You can add any number of inputs and outputs but the principle is the same. Something initiates an action and sets the time when that action (LED lit in this case) will end. The loop checks for the action and checks for the end of the action. Boolean variables keep track of the states of your LEDs so you are not constantly turning them off when they are off already.