If you can't connect or sign in to iCloud, read this support article --> If you can't connect or sign in to iCloud - Apple Support
Verification Failed "problem connecting to the server" March 2018 - Verification failed - Apple Community - Needed to connect over wi-fi and not through cellular.
And the opposite:
"Verification Failed, An unknown error occurred" March 2018 - update apple ID settings notification in … - Apple Community - "tried again with Wifi off and it worked"
If those don't resolve the problem, I suggest you contact Apple:
Contact Apple. Click here --> Choose your country or region - Official Apple Support Select your country, then a product. If you don't see one that handles your issue then keep experimenting with selections until you reach one that gets you a chat session or a telephone call and get the representative to redirect you.
or:
Contact Apple for support and service --> "See a list of Apple phone numbers around the world."
Click here --> Contact Apple for support and service - Apple Support