YouTube is the hardest app to lock because it is both a feed and a tool. You may need a tutorial for work and lose an hour to Shorts in the same evening.
On iPhone
From App Lock, open Pick apps and tick YouTube.
Add youtube.com under websites as well, or a link in a search result opens the same videos in Safari.
On Android
With usage access and the overlay permission granted, YouTube shows up in the game’s list with your time in it this week.
The lock on Android covers installed apps only. YouTube in a browser stays open. If that is how you watch, pick the browser too.
Shorts cannot be locked on their own
The lock works on whole apps, so there is no switch for Shorts only. What works in practice is to let the minutes carry the difference: a ten-minute tutorial costs ten push-ups at the starting rate, and an hour of Shorts costs sixty. Long videos you need stay cheap, the endless ones stop being free.
If YouTube is part of your job, leave it out at first and lock a feed you only scroll. You can add it later.