First, there's always a confirmation dialog that you have to click through before the collection is deleted.
Also note that the items are most likely still in your library root, even though you deleted the collection. Items are never deleted — or even moved to the trash — if you just press the Delete key.
But if you just did this, you should be able to restore a deleted collection from one of the automatic backups. Note the specific instructions for restoring collections.
Zotero 7 will make it possible to restore a deleted collection from the trash.
First, there's always a confirmation dialog that you have to click through before the collection is deleted.
Also note that the items are most likely still in your library root, even though you deleted the collection. Items are never deleted — or even moved to the trash — if you just press the Delete key.
But if you just did this, you should be able to restore a deleted collection from one of the automatic backups. Note the specific instructions for restoring collections.
Zotero 7 will make it possible to restore a deleted collection from the trash.