It’s generated locally when you create your account and not shared with 1Password. Various keys are derived from your master password and secret key.
The secret key is never sent to 1Password and is only used locally.
This is why it’s so much more secure than LastPass, and Bitwarden, and any other cloud hosted solution. I know, I just pissed off all the Bitwarden fans, but it is true.
You must save your Secret Key, but it’s also saved in Apple’s Keychain so there’s a copy there as well.
Finally, if you do lose your secret key, your account can be recovered using the Account Recovery process as long as there is someone else on your account with the appropriate permissions. If you want to know how that works, ask, but it’s sort of lengthy so I’ll skip it for now.