You can use MusConv to transfer songs between apple music and spotify, I've been using it and i think it has been the easier way to transfer playlist from one to another.
It also has interesting features like:
-Transfering unlimited tracks.
-Transfering unlimited playlists.
-Supports over 20 playlist file formats.
Also supports more than 30 music services.