If you need to change the password on your Mac computer, here's a guide on how to change or reset it (if you've forgotten the original password).
You can lock apps on an iPhone with a passcode-protected time limit in Screen Time. Here's how to do it.