Spotify seems to rely more on cross-device sync. As the name of the feature suggests, it depends on having the actual media file stored locally. In contrast, YouTube Music stores everything in the cloud.
Local files work fine if you're always playing music on devices you own and that have local storage. But if you're using media devices like a Chromecast (unless you're casting directly from a device that has access to the local files), or on machines where you don’t have sync privileges—like a work computer—YouTube Music will work, but Spotify won’t.
Local files work fine if you're always playing music on devices you own and that have local storage. But if you're using media devices like a Chromecast (unless you're casting directly from a device that has access to the local files), or on machines where you don’t have sync privileges—like a work computer—YouTube Music will work, but Spotify won’t.