Hi rudraksh84
welcome to this Apple (user-to-user) Community!
Am no expert in this area, yet your unanswered post deserves some response.
________________________________________
Re: "Apple music : unable to enter 2FA code :
" I recently purchased apple music's family plan but i am unable to add members to it"
For 2 FA: Seems you can set-up an Apple Account using iTunes if you don't already have one.
If you set one up in order to join Apple Music, you may just need to add your phone number to it.:?
We understand you don't have an Apple device. Seems through iCloud for Windows and iTunes for Windows you should be able to access many of Apple's services.
Apple Support has the iCloud for Windows User Guide - Apple Support online
and
also the iTunes User Guide for PC - Apple Support The "Table of Conents" in these guides can be helpful.
From the Above User Guide:
Subscribe to Apple Music using iTunes on PC - Apple Support
Eg: says:
"Note: To use Family Sharing, you need an Apple ID (or Apple Account) and you must be part of a family group, either as the organiser or an invited family member. To share Apple Music through Family Sharing, someone in the group must have a family subscription — as opposed to an individual subscription — to Apple Music or Apple One."
How to: Use Family Sharing to share iTunes Store purchases on PC - Apple Support
Eg: says:
"With Family Sharing, up to six family members can download each other’s iTunes Store purchases to their own computers and devices. Family members can also hide their purchases so others can’t download them."
"To use Family Sharing, you need an Apple ID (or Apple Account) and you must be invited to join a family group. "
_________________
Also, we don't know what devices the family members will be using:
Apple support's articles below may help:
For Android Devices:
Use Family Sharing with Apple Music on Android - Apple Support
Add music to your queue to play next on your iPhone, iPad, iPod touch, or Android device - Apple Support
If you need more help you may want to reach out to the experts:
There's a Music Support Website (info. / support / contact options etc.):
Music - Official Apple Support
and
An Apple Account website: Official Apple Account Support: :Apple Account - Official Apple Support
All the best :-)