millis() resets every time I open the Serial Monitor

If you connect a USB-TTL cable to the Rx Tx and GND connections you can use it to communicate between a PC and an Arduino without causing a reset.

...R