Problems with millis()

And what would be that something?

And what is the problem?

You could post your sketch and then say "I was expecting this, but instead I get that", or "getDistance() seems to be interfering with the movement of the motor and I don't know why"

Take a brief moment to read: https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/681310