Air Hockey Robot, Stepper Motors Help

Hi,
I'm trying to build an Arduino air hockey table for a project, it is inspired by an open-source/open hardware material.
I'm having extreme issues with the mechanics, I have tried to change a few things to the code to make it work slightly according to the available hardware structure.

So I have a 2x1 meters table, I have 4 coordinates to work with x,y of the puck and the robot.
I reachedwhere I can only move my stepper motors with delays of 100 microseconds on the x-axis, using timers for more speed causes the structure to act very weird.

I have a working algorithm that predicts where the puck is going to land, this would be helpful to move the robot, even though it is currently slow, I can continue with a working logic at least that only moves on the x-axis.

I use image processing to grab both the prediction and the current robot position, let's say I have two x coordinates, and I want to move the robot to the predicted value before the puck reaches, I know this requires very fast speeds but again I just need a working logic for this.

The camera returns x coordinates from 0 to 400, and a full round from 0 to the end of the table width takes about 20000 stepsPerRevolution.

So I need a working algorithm, that is non-blocking to quickly take the predicted value and the current robot's coordinate and move it to that predicted value, the following code makes the robot hit the sides and getting stuck too much, and it is blocking, something isn't working well.

      com_pos_x = predict_x; // predict projectile landing position
         if(com_pos_x > robotCoordX){
              targetPositionX = com_pos_x - robotCoordX;
               stepsPerRevolution = targetPositionX * 50; // convert 400 to 20000
               digitalWrite(dirPin1, LOW); // These two lines determine whether the robot moves right or left on the x-axis
               digitalWrite(dirPin2, HIGH);
  for (int i = 0; i < stepsPerRevolution; i++) {
    // These four lines result in 1 step:
    digitalWrite(stepPin1, HIGH);
    digitalWrite(stepPin2, HIGH);
    delayMicroseconds(80); // Lowest delay i could reach with 1/8 microstepping using A4988 driver
    digitalWrite(stepPin1, LOW);
    digitalWrite(stepPin2,LOW);
    delayMicroseconds(80);
  }
        
        
        }
        else if (com_pos_x < robotCoordX){
      targetPositionX = robotCoordX - com_pos_x ;

          stepsPerRevolution = targetPositionX * 50;
   digitalWrite(dirPin1, HIGH);
  digitalWrite(dirPin2, LOW);
  // Spin the stepper motor 1 revolution slowly:
  for (int i = 0; i < stepsPerRevolution; i++) {
    // These four lines result in 1 step:
    digitalWrite(stepPin1, HIGH);
    digitalWrite(stepPin2, HIGH);
    delayMicroseconds(80);
    digitalWrite(stepPin1, LOW);
    digitalWrite(stepPin2,LOW);
    delayMicroseconds(80);
  }

I'm an absolute newbie with Arduino, and I need to make this at least logically working if not properly working with proper speeds,

Kind Regards.

Maybe look into PID control