I don't think that's the same, is it? That's just Spotify letting you play files on your local device.
With YT Music you upload them from one device to the YT Music cloud, and then any device can access them/stream from the YT Cloud. You can't upload your music to Spotify, only use it to access media that's stored locally on your device.
Last time I tried, I was able to load the local file on desktop, and then sync that playlist on mobile (to listen to the "desktop song" on mobile even when offline). So I'd argue it provided similar functionality.
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.