Hi there JJYAS,
Welcome to Apple Support Communities.
We understand that you're not receiving your verification code for TestFlight. It would be best to reach out to Apple Developer Support for assistance. For the issue with the App Store not connecting, make sure that you have a stable Wi-Fi network and you have updated to the latest software version. You can check in Settings > General > Software Update. Check out additional steps in If you can't connect to the App Store, iTunes Store, or other Apple services
Regards.