No installing jailbreak required. This is a free option
Here is a free instruction how to lock any app with passcode:
Go to the Settings app
Tap Screen Time
Choose This Is My Child’s Phone
Tap Use Screen Time Passcode
Create a passcode
Reenter the passcode to confirm. (You may be asked to enter your Apple ID and password.)
Follow the on-screen directions until you get to the Parent Passcode.
Enter your passcode.
Reenter the passcode to confirm
Tap Content & Privacy Restriction
Turn on Content & Privacy
Choose a new passcode.