To lock apps on iPhone with Shortcuts, create a Personal Automation: When App is Opened, choose the app, run immediately, and add the Lock Screen action. Opening the app locks the iPhone, so you need Face ID or your passcode. On iOS 18 and later, Require Face ID or Cloak is simpler.
Updated 1 min readGambit Studio
Build the automation
Open Shortcuts > Automation > + (New Automation).
Choose App, pick the apps, select Is Opened and Run Immediately.
Add the action Lock Screen and save.
Limits
After you unlock, the app is open behind the Lock Screen; reopening it locks again.
It locks every time, even for you, unless you add conditions.
Anyone with your passcode gets in.
On iOS 18 and later
Use Require Face ID on the icon: it relocks when you quit and hides content from search and notifications (Apple). Cloak (iOS 18.5+) adds a password of its own, groups and 10-minute access.