You can assign a DID to the queue by navigating to the queue and clicking on Add a DID/DDI, which in turn will create a new inbound rule for that specific DID.
Then you need to create office hours for that inbound rule by navigating to the inbound rule, and enabling the option "Set up Specific Office Hours for this rule"
Then on the "Destination for calls outside office hours" choose the option End call.
If you would like the caller to hear a prompt informing them that the queue is closed, you can instead set the "Destination for calls outside office hours" to route the call to an IVR which will play a pre-recorded message.
Alternatively, if all agents are logged out of the queue, then the call will again go to the "Destination no answer", which you can configure to route to an IVR and play a pre-recorded message.