Hello and welcome to Apple Support Communities, riham101!
I understand you're unable to connect to the App Store, as well as listen to music from Apple Music. I'd be happy to help you troubleshoot.
For App Store, use these steps to troubleshoot: If you can't connect to the App Store, iTunes Store, or Apple Books
For Apple Music, give these steps a try: Get help with iCloud Music Library
"If you can't download, play, or access songs
First, check iTunes to see if the song is ineligible for upload. Additionally, if you added the song to your library from the Apple Music catalog, it might no longer be available on Apple Music.
Open Safari on your iOS device or Mac, or a web browser on your PC, and go to any website to make sure that you have a strong Wi-Fi or Internet connection.
If you can't connect to a Wi-Fi network on your iOS device, you can try using cellular data:
- Go to Settings > [your name] > iTunes & App Store.
- Turn on Use Cellular Data.
You might have to pay a fee to download over a cellular network. Contact your wireless carrier for details, and learn about cellular data settings and usage."
Thank you for using Apple Support Communities.
Enjoy your day!