Hiding a photo is not the same as locking it, and for a long time on iOS it was close to the same thing. Since iOS 16 the Hidden album is locked, so a hidden photo is actually behind Face ID, Touch ID or your passcode.
To hide something, open Photos, touch and hold the photo or video, tap Hide and confirm. It leaves your library and the normal albums.
To get it back, tap Collections, scroll to Utilities and tap Hidden. Tap View Album, unlock with Face ID or Touch ID, touch and hold the item and tap Unhide. Apple says that in iOS 16 and later the Hidden album is locked by default.
Settings > Apps > Photos > Show Hidden Album
Switch Show Hidden Album off and the album disappears from Photos altogether, so someone swiping through your Utilities section won’t even see it exists. That setting is on and visible by default.
The caveat: this is a screen lock, not encryption of the photo. Anyone who knows your passcode can still open the album when Face ID fails, and if you use iCloud Photos, a photo hidden on one device is hidden on your other devices as well, so check those too. I would also not treat it as a place for things that really must stay secret, because a photo you sent earlier is still wherever you sent it.
Further reading: Hide photos on your iPhone, iPad, Mac or Apple Vision Pro with the Hidden album
Going deeper: Guide: Immich on Unraid, back up the photos on your iPhone automatically