Stepper Motor won't go more than one step when in an 'if'

So I’m trying to control two stepper motors. Currently working on getting the first one to move X distance when pressed. I can get it to move continuously but I only want it moving so far.

So I placed it within an ‘if’ statement and now it only does one microstep. I thought if I set the thing to run within an if statement it would carry out X number of steps. Please help, this is for a big project due tomorrow.
You’ll see the bit in satpos == 1

#include <LiquidCrystal.h>
#include <Stepper.h>

const int stepsPerRevolution1 = 200;
const int stepsPerRevolution2 = 200;
LiquidCrystal lcd(1, 2, 4, 5, 6, 7);
Stepper StepperElev(stepsPerRevolution1, 22, 24, 26, 28);
Stepper StepperBase(stepsPerRevolution2, 23, 25, 27, 29);
const int nextbutton =  41;
const int backbutton =  40;

int buttonstate = 0;
int buttonstate2 = 0;
int lastbuttonstate = 0;
int lastbuttonstate2 = 0;
int satpos = 0;
int satdirection = 0;
int hasbeendone = 1;

void setup()
{
  lcd.begin(16, 2);
  lcd.clear();
  pinMode   (nextbutton, INPUT);
  pinMode   (backbutton, INPUT);
}

void loop()
{

  buttonstate = digitalRead(nextbutton);

  if (buttonstate != lastbuttonstate) {
    if (buttonstate == HIGH) {
      satpos++;
      satdirection = 0;
      hasbeendone = 0;
    }
    delay(50);
  }

  lastbuttonstate = buttonstate;

  buttonstate2 = digitalRead(backbutton);
  
  if (buttonstate2 != lastbuttonstate2) {
    if (buttonstate2 == HIGH) {
      satpos--;
      satdirection = 1;
      hasbeendone = 0;
    }
    delay(50);
  }

  lastbuttonstate2 = buttonstate2;

  

  if (satpos == 0) {
  lcd.clear();
  lcd.print ("SAT1: Astra 28:E");
  lcd.setCursor(0, 1);
  lcd.print ("Back        Next");
  delay(100);
  }

  if (satpos == 1) {
  lcd.clear();
  lcd.print ("SAT2: Astra 28:F");
  lcd.setCursor(0, 1);
  lcd.print ("Back        Next");
  delay(100);
    if (hasbeendone == 0) {
      StepperElev.step(stepsPerRevolution1);
      hasbeendone = 1;
    }
  }
  
  if (satpos == 2) {
  lcd.clear();
  lcd.print ("SAT3: Astra 28:G");
  lcd.setCursor(0, 1);
  lcd.print ("Back        Next");
  delay(100);
  }
  
  if (satpos == 3) {
  lcd.clear();
  lcd.print ("SAT4: Astra  1:N");
  lcd.setCursor(0, 1);
  lcd.print ("Back        Next");
  delay(100);
  }
  
  if (satpos == -1){
    satpos = 3;
  }
  
  if (satpos == 4){
    satpos = 0;
  }

  
    
}

You have not called stepper.setSpeed() so the motors may be trying to move faster than is possible.

If you need more help post a link to the datasheet for your stepper motors and tell us what stepper motor driver and stepper motor power supply you are using.

...R
Stepper Motor Basics
Simple Stepper Code

also look up the AccelStepper library

const int nextbutton =  41;
const int backbutton =  40;

You gave the pins meaningful names.

int buttonstate = 0;
int buttonstate2 = 0;
int lastbuttonstate = 0;
int lastbuttonstate2 = 0;

Then, you gave the state variables stupid names. Why? currNextState, prevNextState, currBackState, and prevBackState would make so much more sense.

Why are all those useless delay()s in your program?

You REALLY need to explain the relationship between the next and back switches and satpos and satdirection.

Setting satdirection every time the next or back switches are pressed doesn’t make sense. The direction to step depends on the current position and the desired position, NOT which switch is pressed.