I'm not sure if there is a way without third-party software, which I typically don't trust but some people are different🤷🏼♂️
If you're already an Apple Music subscriber the music on there is free for you to listen to, add to playlists, and download for offline listening. There is no need to rebuy songs. Simply create a playlist and add the songs!
You can read this support page for helping creating a playlist and adding music: How to make a playlist in the Apple Music app - Apple Support.
I hope this answers your question! Maybe someone else will have a solution for transferring the music.