millis() resets every time I open the Serial Monitor

Yes it does.

What are you trying to do?