While technically you can, it’s not advised. Closing the laptop screen may cause it to enter sleep or hibernation mode, interrupting the update process. It’s better to let the update be done with the screen open.