Private Browsing keeps pages out of your history, yet the tabs themselves can sit there open for the next person who picks up the device.
iPhone: Settings > Apps > Safari >
Require Face ID to Unlock Private Browsing
Mac: Safari > Settings > Privacy > Private Browsing >
Require Touch ID or password to view locked tabs
With the lock on, private windows need your face, finger or passcode before they show anything. On the phone they lock when Safari goes to the background, when you switch away from private tabs or when the device locks. On a Mac it happens after the window has been inactive for a while, or when you lock the machine, put it to sleep or the screen saver starts. The Window menu also has Lock All Private Windows if you want it done now.
I’d keep this on for gift shopping alone. Nothing ruins a surprise faster than a lent phone.
Two exceptions to remember: a private window doesn’t lock if no page has loaded, or while it plays audio or video. And the lock only protects what is on your device. Private Browsing never made you anonymous to the websites you visit or to the network you use.
Further reading: How to use Locked Private Browsing in Safari
Going deeper: Guide: run your own search engine with SearXNG and make it the default on your iPhone and Mac