iPhones are personal devices, not meant to be shared. Your phone has a passcode. The problem is where do you stop? Some people will want a passcode on contacts, someone else on calendars, another on reminders, then there’s a clear need for passcodes on texts, email, phone log, websites visited - the list never ends. The actual answer is don’t share your phone. Or if you do use Guided Access, that limits the user to one app.
There are 3rd party photo vaults that can have a separate passcode.
BTW, this is a user-to-user forum; we can’t put any feature on an iPhone, only Apple can. You can make a request to Apple at https://apple.com/feedback.