In case of loss a master password cannot be restored. But, if you haven’t deleted Surf from your device, and have not yet logged out of your account (merely closed the app) and you remember your PIN, or have Face ID/Touch ID enabled, then the master password can be obtained in Surf. Go to Settings → Safety protections → Master password.
The master password must be backed up and protected from accidental loss, because if you lose it you will not be able to recover it. You bear full responsibility for storing your master password in a safe place where you can recover it; otherwise, you risk losing control over any and all assets that are associated with your master password, forever.