Cycle between High and LOW signal every milliseconds for 6 seconds

analogWrite() is the wrong thing to use.

If you want to time things to millisecond accuracy, use microseconds. There's 1000 microseconds in a millisecond.

You don't need to be using balanced on- and off-times for the stepper. Most stepper drivers only require the pulse to be on for 1 microsecond. So switch it on, delayMicroseconds(1) and then turn it off right away.