You can lock apps on an iPhone with a passcode-protected time limit in Screen Time. Here's how to do it.
You can lock a Samsung Galaxy S10 with a swipe pattern, passcode, or password. You can also use facial and fingerprint recognition.