iPhone Wi-Fi problems are nearly always settings-related, not hardware. Go in this order.
1. Toggle Wi-Fi and Airplane Mode
Open Control Centre, turn Wi-Fi off and on. Then turn Airplane Mode on for 10 seconds and off again — this resets the radios.
2. Restart the iPhone and the router
Power your iPhone fully off and back on. While you're at it, power-cycle the router. This pair fixes most cases.
3. Forget the network and rejoin
- Go to Settings > Wi-Fi.
- Tap the i next to your network, then Forget This Network.
- Reselect it and re-enter the password carefully (passwords are case-sensitive).
4. Check for a software update
Go to Settings > General > Software Update and install anything pending — Wi-Fi bugs are often patched here.
5. Reset Network Settings
If nothing else works, go to Settings > General > Transfer or Reset iPhone > Reset > Reset Network Settings. This clears Wi-Fi passwords and VPN/APN settings but keeps your photos and apps. You'll need to re-enter Wi-Fi passwords afterwards.