Locking apps on your phone is the best way to prevent others from accessing them, and on iPhones, you can do this using a procedure called (screen lock) that Apple added in the Shortcuts program with iOS 16.4 and the automation feature available in Make a Plan. Self
How to use screen lock to lock apps on iPhone:
1- Open the Shortcuts app and go to the Automation tab.
2- Click on the “Create a personal automation” option.
3- Scroll down to find the Application option and tap on it.
4- Click on the Choose button and select the programs you want to lock.
5- Activate the (Open) option, then press (Next).
6- Click on the Add Action button and search for Lock Screen in the search box and click on it, then click on Next.
7- Disable the (Ask before running) option so that automation runs automatically, then click Done to save.