One fix I have found is to delete unused "known networks" under Settings / Network & Internet / Wi-Fi / Manage known networks, then do a Restart. If that doesn't work, you may need to check the DNS settings for each known network / connection. If nothing looks wrong there, then you may have to delete the bad networks as well, Restart the system and connect from scratch. I've found this corruption happens after connecting to poorly configured hotspots/routers (truly avoid public/random Wi-Fi if at all possible).
If none of that works, run the Network Troubleshooter.