You can now move playlists between Apple Music and YouTube Music in an official manner. Apple has published two help documents (linked as the Sources below) which outline what you need to do to switch from one service to the other.
Before you ask – no, there’s no official way to move from Apple Music to Spotify or Spotify to Apple Music. For now, it’s only Apple Music to YouTube Music or YouTube Music to Apple Music.
Keep in mind that only the playlists you’ve created (including collaborative playlists that you own) are transferred. Music files, non-collaborative shared playlists and curated playlists, and folders in which you’ve organized your Apple Music playlists are not transferred.
If an Apple Music playlist you want to transfer includes podcasts, audiobooks, or user-uploaded audio files, those won’t make the jump and only the songs in the playlists will. If the service you’re transferring to doesn’t have specific songs, then obviously they won’t be transferred.
The whole process, regardless of direction, should typically take a few minutes, but it could go up to several hours depending on the number of playlists you’re transferring. Full instructions on how to transfer can be found at the Sources linked below.