when you sign up for Apple Music you can then use a function on a computer* running the Music app to upload your music library to the cloud [the list, not the actual files]The phone app can play your tracks stored in the phone and also stream. The app on Tesla can only stream. I do not believe you have the option of loading your personal music collection to apple music app in Tesla.
this used to be called iTunes Match
now you just pull down the file menu and select library > update cloud library
you then get access to your whole library - artists, albums and playlists
on Carplay this works very well, but as I’ve mentioned the interface on my Tesla is a bit more tedious
*I’m a Mac user and I’m not sure whether the same functionality is available to Windows users