Issues with millis timing with a button press as well as seven segment display

Read the reference:

https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/

https://www.arduino.cc/reference/en/language/functions/analog-io/analogwrite/