It is no longer possible to add Apple Music tracks to TikTok. Before this change, it was possible to connect Apple Music to TikTok by going to Me > 3 dots > Accessibility > Connect to Apple Music.
From now, due to copyright restrictions, you can only use the royalty-free music library. If you still want to use Apple Music tracks, you should use a video editor, then upload the video to TikTok. However, keep in mind that by doing so, TikTok may restrict or block your video if they notice that the music isn't licensed for commercial use.
To avoid any copyright issue, it is recommended to use their royalty-free library, unless you've the full rights to use a track.