How do I pause a loop just once?
The following code will pause (Give some delay) when it runs for the first time and also when you press the button.

void loop() {
  static int status = true;
  if(status){
    //Pause
    delay(15);
    status=false;
    return;
  }
  
  if(digitalRead(switch_pin) == LOW){
    digitalWrite(led_green_pin,LOW);
    digitalWrite(led_red_pin,HIGH);
    lastMotionState    = currentMotionState;            
    currentMotionState = digitalRead(MOTION_SENSOR_PIN); //
      if (currentMotionState == LOW &amp;&amp; lastMotionState == HIGH) { 
        servo.write(90);
      }
      else if (currentMotionState == HIGH &amp;&amp; lastMotionState == LOW) { // pin state change: HIGH -&gt; LOW
        servo.write(0);
      }
  }
  else{
    status = true;
  }
}

Give delay according to your need.