How to add a track to Library in Apple Music using Apple Script
I'm not in front of a Mac at the moment, so can't test this, but what happens if you try the following:
tell application &quot;Music&quot;

    set newFile to (choose file with prompt &quot;Select track you want to add...&quot;)

end tell

Of course, you can change the 'prompt' text to whatever you want.
Also, in case you're wanting to, you should be able to get the script to add the track to a specific playlist by adding the following line after the set newFile line:
add newFile to playlist &quot;Newly added tracks&quot;

Of course, you can change the 'playlist' name by changing the text within the quotation marks to whatever you want.