You can turn off your iCloud music library to stop syncing your music across all of your Apple devices.
If you want to switch from Spotify to Apple Music, you can use a third-party app to transfer your playlists.