Click the Spaces icon in the left sidebar and select Manage Spaces.
Enter your Master Passcode.
Toggle Enable Passcodes to ON.
Choose a Space and click Edit.
Under Passcode Protect, select your preferred option (Off, Master Passcode Required, or Space Passcode Required).