For example I ran into this and the router was oddly set for channel 14.
In the US that could create connection problems. Read https://en.wikipedia.org/wiki/List_of_WLAN_channels on why.

Some devices would connect but they did have your issue.

This is not to write this is your issue but you gave no details. At worst you have to replace the router. At best it's a router setting.