Apple Music subscriptions are linked to Apple ID accounts, not to specific devices per se.
Family Sharing is for up to six family members (each with their own Apple ID) to share e.g. purchases and/or an Apple Music Family Subscription.
Family Sharing - Apple Support
Get organized. One person in the group will be the official organizer, and be financially responsible.
Set up Family Sharing - Apple Support
Get a subscription for (family) groups. Only the organizer subscribes. The others get the service by being part of the group.
Get an Apple Music Family subscription - Apple Support