4 Digit 7 Segment Display randomly turning on and off for no reason

Delay could be causing the issue. If too many delay are run concurrently, it can cause the display to stop working for moments.