you use a library for stepper-motors that offers background step-pulse-creation.
This hsort answer does not help very much - I know.
A stepper-motor driven by the stepper.h-library needs a step-pulse for each step the stepper-motor shall do. Otherwise you would have no control over the stepper-motor.
This means you have to let void loop looping for 20 seconds.
This requires non-blocking timing which is described here.