If you have a rooted device, you must be having Magisk root with Magisk Manager.
If you are having a rooted device, you must be having Magisk root with Magisk Manager, right? If not, you can get it here! So, for the rooted device, we have a Magisk Module, which can install YouTube Music Premium Mod on your phone.
How to install YouTube Music Mod APK on rooted devices