Try this method from Leave Family Sharing - Apple Support:
Remove your Apple Account from a family group online
If your Apple Account is being used to share media purchases with a family group that you no longer want to part of, you can leave the family group and remove your Apple Account from the family group altogether. To remove your account, go to account.apple.com and sign in to your Apple Account.
In the Family Sharing section:
- On your iPhone, iPad or Mac, sign in to account.apple.com with your Apple Account and password.
- On your iPhone, tap the downward-facing arrow at the top of the page, then tap Family Sharing. On your iPad or Mac, click Family Sharing on the left-hand side of the page.
- Tap or click Disconnect Account.
- Tap or click Disconnect.
After you leave the family group, you can start your own family group or join another one.
tt2