"Cutting off" circuit with 2 momentary switches

Hello all!
What I am trying to do is the following, but I am failing pretty hard. Could you guys please look at the code and help me solve the problem?
Basically I want an LED to turn on whenever I push button1 (switchPin in this sketch) and stay on for 2s after releasing button1 OR until button2 (cutoffPin) is pressed. Even if button2 is released, the LED will stay off until button1 is pressed again.

I really appreciate the help!
Thanks!
Charlie

const int switchPin = 1;
const int ledPin = 0;
const int cutoffPin = 2;

int switchState = LOW;
int cutoffState = LOW;
int ledState = LOW;

void setup()
{
  pinMode(switchPin, INPUT);
  pinMode(cutoffPin, INPUT);
  pinMode(ledPin, OUTPUT);
  
}

void loop()
{
switchState = digitalRead(switchPin);
  if (switchState == HIGH) {
    ledState = HIGH;
    ledControl(HIGH);
    cutoffState = digitalRead(cutoffPin);
    while(ledState == HIGH) {
      if (cutoffState == HIGH) {
        ledState = LOW;
      }
      delay(2000);
      ledState = LOW;
   }
    ledControl(LOW);
   }
}
void ledControl(int state) {
  digitalWrite(ledPin, state);
}

was it something like this that you were looking for?

/*
CIRCUIT:
   * led to Arduino pin 4
   * button1 to Arduino pin 8
   * button2 to Arduino pin 9
      (using a 10k pull-up resistor for both buttons)
*/

// VARIABLES
int led = 4;
boolean ledState = LOW;
long ledStart;

int interval = 2000;

int but1 = 8;
int but1State;
int lastBut1State = HIGH;

int but2 = 9;
int but2State;
int lastBut2State = HIGH;


void setup() {
  pinMode(led,OUTPUT);
  pinMode(but1,INPUT);
  pinMode(but2,INPUT);
}

void loop() {
  // read buttons
  but1State = digitalRead(but1);
  but2State = digitalRead(but2);

  // if button1 is pressed
  if(but1State != lastBut1State && but1State == LOW) {
    ledState = HIGH;      // set led state to HIGH
    ledStart = millis();  // save starting time
  }

  // if button2 is pressed
  if(but2State != lastBut2State && but2State == LOW) {
    ledState = LOW;      // set led state to LOW
  }

  // check if 2 second have passed since led was turned on
  if(millis() - ledStart >= interval){
    ledState = LOW;      // set led state to LOW
  }
  
  digitalWrite(led,ledState);  // write the ledState
  
  // update lastButton variables
  lastBut1State = but1State;
  lastBut2State = but2State;
}

i didn't try it, but give it a go and make any changes you need.

as you can see i am not using the delay() function. i am using a very useful technic to see if a set amount of time as gone by which you can learn how to use here:

Good lock!
=)