If you want to listen to a (non-music) YouTube video with your phone screen off, open the video in Picture-in-Picture mode, play the video, lock your phone (this will pause the video), press the power button and swipe open the control center without unlocking the phone all the way. Hit the play button. Lock your phone. Profit.