On a computer:
1. Open YouTube.
2. Click on your profile picture in the top-right corner of the screen.
3. Select "Settings" from the drop-down menu.
4. Click on "Restricted Mode" in the left-hand menu.
5. Toggle the switch to "On".
On a mobile device:
1. Open the YouTube app.
2. Tap on your profile picture in the top-right corner of the screen.
3. Select "Settings" from the drop-down menu.
4. Tap on "General" in the left-hand menu.
5. Scroll down and tap on "Restricted Mode".
6. Toggle the switch to "On".
Please note: Locking YouTube will not prevent users from accessing other websites or apps. If you want to restrict access to other content, you may need to use a parental control app or service.