The process for transfering from YouTube Music is described in both Google Takeout documentation, where the transfer begins, and an Apple Support article. If your playlists are already in YouTube Music, Google is the exporter. It sends the playlists to an account you choose and authorize on Apple.
When the transfer is done, you will receive an email with your Apple ID associated email.
Plalists already on Apple Music can be copied to YouTube Music using some of the same underlying technology and with some of the same caveats. Starting from Apple Music playlists, as described in the Apple Support Article, Apple's Data and Privacy page offers data transfer functionality. You'll need to already have a YouTube Music account.
The playlist transfer technology does song metadata matching to attempt to accurately identify a song on one system with the best match on another service. Since most commercial songs are already available on both services, it's not actually transfering the audio files. Audio files are not transferred, therefore any imported or uploaded audio files (including podcasts, audio books or your own audio uploads) are not transferred.
The source code (markdown) for this article can be found on GitHub.