Code or "Routine" Improvement and Assistance

Hello all. I am new to the C programming language and am having a hard time with writing a routine to perform a task with my arduino. I have posted the code below. I have tried searching and helping myself as is suggested in the "how to use this forum" guide. When I read the examples, forum posts, and reference material what I read makes sense to me most of the time, but I don't know how to apply it in my code. I know this is "my problem" but I don't know how to fix it other than asking for assistance.

My specific set up is a heat treat oven that has pneumatically operated doors and a winch system (referred to as "elevator"). I am attempting to use the arduino to replace an aged obsolete control that quit working. I replaced all the wire from the switches with shielded wire. I have the shield drains connected to earth ground. The buttons are wired from the input pin of the arduino to the arduino ground. I am using the "INPUT_PULLUP" method to use the internal pullup resistors. The outputs are wired to two generic "8 Relay" boards that are common on amazon using the analog pins (as digital pins) A0-A15 (low enables the relay). The door solenoids and the up / down functions of the elevator are all controlled by these relays. I have the manual functions of the system working properly. These are door open, door close, elevator up, and elevator down. There is likely room for improvement in my code there as well, and I appreciate all feedback. What I am having trouble with is the automatic functions of the elevator. The first one that I tried to program is the elevator to furnace function. The flow should go as follows.

The operator presses the "To Furnace" button. (Input Pin 26 == LOW).
The status of the elevator at furnace switch is checked (Input 34).
If the switch is made(34 == LOW), do nothing (the elevator is already at furnace).
If the switch is not made(34==HIGH)
Open the furnace doors. (A10 == HIGH, A11 == LOW)
Check to make sure that the doors are actually open (Inputs 35 && 38 == LOW)
Jog the elevator up (A7 && A5 == LOW)
Until the at furnace switch makes (34==LOW)
Close the doors (A10 == LOW, A11 == HIGH)

With the code that I currently have, the doors open, and nothing else happens. I believe this is because the code only runs through once(all "if" statements), and the doors are not open when the input is checked. What I am trying to accomplish is that when the "To Furnace" button is pushed, the code is run and no other functions can take place until it is satisfied. So if the elevator is already in position, the program would stop there as nothing else is required. If it is not, I would like the program to run line by line as each condition is met (Kind of like a PLC ladder?). So if the at furnace switch is not made, and the doors are commanded open but nothing else happens until the switches are made. Once the switches are made, then the rest of the steps can be completed. I believe the while function is what I need, but I am not sure where to implement it into my program. I have read the reference material on "while" but I am still not able to wrap my head around how to use it in my case. Another thing worth mentioning, is that I know it is not professional to use delays and that the millis function or Bounce2 would be a better option, but I am not sure how to implement either. Right now I am trying to focus on getting the routines programmed. I am hoping that I can learn from the other members of the forum to gain enough knowledge to program the other two routines myself, but if I cannot, I will need to have them written for me. I am more than happy to pay for this service if I cannot do it myself.

The code is below:

  //Door Close 
  if (digitalRead(22) == LOW) {delay(50); if (digitalRead (22) == LOW) {digitalWrite(A10, LOW);digitalWrite(A11, HIGH);}}
  
  //Door Open
  if (digitalRead(23) == LOW) {delay(50); if (digitalRead(23) == LOW) {digitalWrite(A10, HIGH);digitalWrite(A11, LOW);}}
  
  //Elevator Up 
  if (digitalRead(24) == LOW) {digitalWrite(A7, LOW);digitalWrite (A5, LOW);}
  if (digitalRead(24) == HIGH) {digitalWrite(A7, HIGH);digitalWrite (A5, HIGH);}
  
  //Elevator Down
  if (digitalRead(25) == LOW) {digitalWrite(A7, LOW);digitalWrite (A6, LOW);}
  if (digitalRead(25) == HIGH) {digitalWrite(A7, HIGH);digitalWrite (A6, HIGH);}
  
  //To Furnace  
  if (digitalRead(26) == LOW) {delay(50); if (digitalRead(26 == LOW)) //check for Button Bounce
  if (digitalRead(34) == HIGH) //If elevator top limit switch is not made
  {{digitalWrite(A10, HIGH);digitalWrite(A11, LOW);} // Open Doors 
  if (digitalRead(35) == LOW && digitalRead(38) == LOW) // Check both doors are open
  {digitalWrite(A7, LOW);digitalWrite(A5, LOW);}} //Jog elevator up
  if (digitalRead(34) == LOW)//Until elevator up switch makes
  {digitalWrite(A7, HIGH); digitalWrite(A5, HIGH);//Stop Jogging
  digitalWrite(A10, LOW);digitalWrite(A11, HIGH);}}} // Close Doors

I did not include the setup but all I am doing in the setup is declaring the pinmodes and setting the relays to High so they do not actuate. I didn't want to add unnecessary clutter to the post.

Thanks all for the time to read my long winded post.

Ok this is going to take a little pain to get it on the right track but it will be worth it, I assure you.

The Arduino is fast: really really fast. Reading and writing digital pins can be done in just a few nanoseconds. I think you are starting to see this. The doors cannot possibly move more than a few micrometers in that time.

Fortunately the Arduino never gets bored. It does not mind asking "Are we there yet?" several thousand times per second.

If the Arduino truly has nothing else to do while waiting for the doors to open then you can use a while loop:

  while(doorIsNotOpen()) {
    openDoor();
  }

But there is always something else useful that it can do. Usually that would include checking the buttons just in case the operator hits the stop button. To do that, you need to think of the system as a state machine. (Look that up.)

If I am understanding correctly, perhaps replacing the

{{digitalWrite(A10, HIGH);digitalWrite(A11, LOW);} // Open Doors 
  if (digitalRead(35) == LOW && digitalRead(38) == LOW) // Check both doors are open

with

  while(digitalRead(35) == LOW && digitalRead(38) == LOW) // Doors are closed
    {digitalWrite(A10, HIGH);digitalWrite(A11, LOW);} //Open Doors

would be a good start?