How to add a LED to be triggered for 5 seconds without blocking any other code

The code will look something like this.
Test it stand alone before integrating it into the rest of your sketch to ensure it all works and you understand it.

const uint8_t myLedPin = X ; // choose a value for X
const uint8_t myButtonPin = Y ; // choose a value for Y
uint32_t myTimer ;

. . . 

void setup() {
    . . . 
    pinMode( myLedPin, OUTPUT ) ;
	pinMode( myButtonPin, INPUT_PULLUP ) ;
    . . .
}


void loop() {
   . . .
   if( digitalRead( myButtonPin == LOW ) {  // button wired so LOW = PRESSED..
      myTimer = millis() ;
	  digitalWrite( myLedPin, HIGH ) ;  // LED wired so HIGH = ON
   }
   if ( digitalRead( myLedPin ) == HIGH && millis() - myTimer > 5000 ) {
      digitalWrite( myLedPin, LOW ) ;
   }
   . . .   

}