Recently, when opening iTunes after letting my Apple Music subscription lapse, I discovered my entire listening history and ~15 years playlist metadata had been automatically purged by Apple. Upon contacting Support I was informed this was the expected behavior and that my data was likely unrecoverable.
Fortunately I had a backup of the metadata. Do you?
Looking to create a backup of your Playlist Metadata? Here's how: https://habd.as/post/backup-restore-macos-mojave/#itunes
That's really bad. I never subscribed to Apple Music, still on iTunes Match - hope that doesn't happen when I let that lapse. Yet another reason not to subscribe to Apple Music.
Yes, via Time Machine.
Google or Duck the search phrase "backup mojave". On page one you'll see an article titled "How to Backup & Restore macOS Mojave". I suggest you start there if you wish to properly back-up your system.
For better data portability you may import your iTunes data into Spotify and use the free streamexport.com website to connect with your Spotify account and, from there, export CSV files representing your entire library.