Your Apple Music account is your Apple Account they aren't separate, so there is nothing to link. If you left Family sharing and had no Apple Music subscription of your own before leaving Family Sharing, then the Music library gets wiped clean, since Apple does not store or save it anywhere without an active subscription.
Family Sharing works across different Apple Accounts for each user.
If you were for some reason sharing an Apple Account and change to a different Apple Account of your own and the old account is still part of Family sharing, then the library would have remained with the old account and has no attachment to your new account whatsoever.
In either case, you will need to recreate the Music library manually.
To keep the music you need to subscribe to your own Apple Music subscription plan before leaving Family sharing so the library can be retained.