how to fix iphone unable to connect to wifi
Usually after some software updates, the Apple iPhone WiFi Connect button can sometimes be greyed out. As usual with network issues, the first step is to reset your network settings.
Reset network settings
In the Settings > General > Reset menu, select Reset network settings.
This will get rid of all existing network connections, which must be entered again after restarting the phone.
When the phone is on, go to Settings > Wifi, then connect again to Wi-Fi to restart your internet connection, after entering the password at the end if necessary.
The wifi button may be inactive because no important software update has been installed.
Go to Settings > General > Software Update, and apply all required updates for your Apple iPhone.
Next, restart your Apple iPhone and see if you are now able to connect to wifi.