How to implement elapsed millis as the timer for my motor spinning time?
delay() is only the tip of the iceberg. The problem with delay() is
that it is a blocking function: nothing else can be done during the
delay. If you want to control your motor and at the same time be
responsive to the user, you must avoid blocking your program. This means
not only getting rid of delay(), but also getting rid of any blocking
function.

Here your problem is on getTheNumber(). This function blocks until the
user is done typing the number. Try to rewrite it in a non-blocking
fashion. For example, it could return -1 on every call as long as the
user is not done typing the number. On the first call after the user is
done it would return the valid value. If you manage to write everything
non-blocking, then you loop() will restart very often, and the program
will work with no significant latency.

As for managing the servo stages, simplest thing  would be to write a
finite state machine. I would write it with four states: IDLE,
STAGE1, STAGE2 and STAGE3. The transitions STAGE1 → STAGE2 → STAGE3 →
IDLE would be time-based, using the elapsedMillis object to track the
time spent in each state. The transition IDLE → STAGE1 would be
triggered by the user input.

static enum { IDLE, STAGE1, STAGE2, STAGE3 } state;
switch (state) {
    case IDLE:
        if (userRequestedToStartAgain()) {
            myservo.write(stage1speed);
            state = STAGE1;
            timeElapsed = 0;
        }
        break;
    case STAGE1:
        if (timeElapsed &gt;= stage1time) {
            myservo.write(stage2speed);
            state = STAGE2;
            timeElapsed = 0;
        }
        break;
    case STAGE2:
        if (timeElapsed &gt;= stage2time) {
            myservo.write(stage3speed);
            state = STAGE3;
            timeElapsed = 0;
        }
        break;
    case STAGE3:
        if (timeElapsed &gt;= stage3time) {
            myservo.write(idleValue);
            state = IDLE;
        }
        break;
}