Google's page explaining Locked Folder says the feature is only currently available on Pixel devices, starting with the 3. The feature helps users password-protect images and videos to keep them from showing up in their main photo library.
As per The Verge, the Locked Folder feature is included as part of the June Pixel update, which will roll out to phones soon. The update also includes the ability to ask Google Assistant to answer or reject a call, take astrophotography videos (on the Pixel 4 and newer), and an improvement to Gboard that places key details (like a phone number) in your keyboard's suggestion strip after you've copied the text to your clipboard.
When the Locked Folder feature was announced at Google's I/O conference, the company said that it would be coming to other Android phones "throughout the year." If you've got an updated Pixel, you can set up the Locked Folder by going to Photos, then to Library -- Utilities -- Locked Folder. Once it is set up, this is where you'll be able to see your secret stuff.
You're able to move existing photos to the Locked Folder, which will remove them both from your regular library and from any existing Memories that the picture may appear in. It's worth noting that, according to Google, you can't back up any photos or videos in the Locked Folder, so there is some amount of trade-off between privacy and convenience. Anything in the Locked Folder can, however, be moved out of it if you no longer need to keep it private.
Google's support page also explains that you can even set the camera to save captured images directly to the Locked Folder, keeping them from ever going into your normal library.