Hi vanshika977,
Thanks for using Apple Support Communities. It sounds like you’re having trouble making a playlist public in order to share it. We’re happy to help.
First, make sure you’re running the latest iOS version:
Update your iPhone, iPad, or iPod touch
Then, make sure you’ve followed the steps below:
Create and share Apple Music playlists
If that doesn’t help, try signing out of, and then back into Apple Music. Keep in mind that this will remove any songs you’ve made available for offline play, and you will need to redownload them once you’ve signed back in.
To sign out, tap Settings > iTunes & App Store > [Apple ID] > Sign Out. Restart your iPhone before signing back in.
Then, follow the steps in the article for sharing playlists again to see if the issue is resolved.
Let us know if that helps.
Take care.