If you want to play YouTube audio only on Android use the app NewPipe:
https://f-droid.org/en/packages/org.schabi.newpipe/
"NewPipe does not use any Google framework libraries, or the YouTube API. It only parses the website in order to gain the information it needs. Therefore this app can be used on devices without Google Services installed. Also, you don't need a YouTube account to use NewPipe, and it's FLOSS."
Playlists:
fddce62e-d65c-45bd-89c4-2368754bd30e-image.png
For audio only use the button "Background":
6267c220-e1c1-463c-9cd1-3900620459fe-image.png
Floating Window (Picture-In-Picture):
ccfd17c4-da66-43f2-b516-7927ab99a26c-image.png
Complete guide on using NewPipe:
https://www.gtricks.com/youtube/floating-window-background-audio-android/