How to keep playing online videos when screen is locked? I want to listen to online videos with my mobile phone in my pocket, but there is always something to touch the screen and interrupt the stream.

The only solution I know is to download and save the broadcast or video on my phone before listening to it with a video player app which can be screen locked.

The issue is that I don't want to download any YouTube video before listening to it, so I'd like to find a way that can keep screen locked while playing a video.
You can try to use an alternative to the default YouTube app, a popular choice being NewPipe. Although I haven't tested this myself yet, one of the listed features is being able to play videos in the background - even just the sound, without having to waste battery by displaying something you dom't actually care about.