It can be a bit buggy at times, but when it comes to just playing music with the screen locked, it’s perfect.
https://addons.mozilla.org/en-US/firefox/addon/video-background-play-fix/
Edit: I forgot to also mention that ad blocker extensions make sailing the seas on mobile much more manageable. Extentions, in general, have been a really nice addition.
Newpipe can also be used as a full-on replacement to the YouTube app or YouTube in a browser. It allows for background music, or video and audio downloads for offline enjoyment.
The apk has to be sideloaded, of course.
Came here to say this. Newpipe has been awesome. You don’t have to sign in, no ads, can still sub and make a playlist. It’s basically youtube premium and I have had zero issues with it.