help with coding for a stepper motor

You still have the line stepper.run() inside an IF statement. Move it to loop() so it is like this

void loop()
{
  PIRSensor();
  stepper.run();
}

And get rid of all the delay()s. If you need intervals use millis() to manage the timing without blocking as illustrated in Several Things at a Time

...R