Some Samsung phones have a “Smart Network switch”. This Smart Network needs to be switched off for the phone to connect.
Go to [Settings] > [Wi-Fi] on your phone and disconnect the “Smart Network switch” and try to reconnect.