in Settings of "Samsung Music" offers the ability to export and import playlists (text files, more details below).
The availability of this feature seems to be dependent on the Android version. My old Samsung phone has Android 10, the new one has Android 12 (Android 13 now).
Both have the same Samsung Music App V 188.8.131.52 installed. Higher versions also have this functionality.
Only on the Android 12+13 phone I could find
Samsung Music: ... 》 Settings 》Manage Playlists 》Export My Playlists
Samsung Music: ... 》Settings 》Manage Playlists 》Import Playlists
Hint: Settings can be found in the three dots menu (...) on the upper right corner of the Samsung Music App.
The playlists are stored in
*.m3uformat in the internal memory, directory
Music. This is an editable text format.
How to backup / restore Playlists:
Use case I: New phone
I was able to transfer the playlists from the old to the new phone by using Samsung Smartswitch. Just ensure the music is on the target phone before running the Smartswitch (use TotalCommander with WiFi plugin etc to copy it). Also important: After copying, run Samsung Music App and give it the time to discover the music on your target phone. Then finally, run SmartSwitch on both phones to transfer apps + settings.
Use case II: Same phone, new SD card
Recently got a bigger micro SD card and transferred the files via PC using a card reader.
I figured out that you can back up all your playlists as described before.
Then, shutdown the smartphone and swap the SD cards (insert the new one with all the files in the same folders on it).
Boot the smartphone, then go to ... 》Settings 》Manage Playlists 》Import Playlists and import all playlists backed up to internal disc earlier.
After that you will see the old playlists with 0 files as well as new ones with the correct file references in it.
Seems the Music App fixes the card ID in the playlists when you import them on the fly.
You may now delete the old playlists with 0 files in them.
Note: In most cases this works fine, but I found that in a few cases the exported playlist cannot be reimported, possibly due to lame programming in the code of the music app. In those cases import ends up with an error (0 files imported).