Two buttons and one solenoid code isue

Hello, I have a simple piece of code here where two buttons are operating a single solenoid. The solenoid stays in operation while either button is pressed and held. While the code works as is, the second button press in the loop function appears to restrict power arriving to the solenoid. Can someone please explain to me why this is? I have changed the order of the loop and it is always the second button press restricting power. Thanks for your help...

int sol1Pin = 9;
int button1 = 6; //button pin, connect to ground to move servo
int press1 = 0;
int button2 = 3; //button pin, connect to ground to move servo
int press2 = 0;

void setup()
{
  pinMode(sol1Pin, OUTPUT);
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  digitalWrite(3, HIGH); //enable pullups to make pin high
  digitalWrite(6, HIGH); //enable pullups to make pin high
}

void loop()
{
  press1 = digitalRead(button1);
  if (press1 == HIGH)
  {
    digitalWrite(9, HIGH);
  }
     else{  //other wise turn it off
       digitalWrite(9, LOW);

   
  press2 = digitalRead(button2);
  if (press2 == HIGH)
  {
    digitalWrite(9, HIGH);
  }
else{  //other wise turn it off
       digitalWrite(9, LOW);
{
    }
  }
}
}

Use auto format (Ctrl +T) to better show the bracketing of your code.

The if else blocks are not correct. The second button code is nested in the first else block, and pin 9 will be turning on and off when only the second button is pushed.

Excellent! Thanks cattledog :)