Hi nunethought
Welcome to the Apple Community.
Re: “Cannot Connect to iCloud” message
Seems you may not be signed in to iCloud with your Apple ID on your iPhone.
If you want to use iCloud: How to Sign in with your Apple ID - Apple Support
Else:
The "Related article" above your question may help, if you follow the steps to take.
If you can't connect or sign in to iCloud - Apple Support
__________________________________________________________
Re: Your screen shot " Wondering what happens when you just click ok ?
___________________________________________________________
Re: I got a text with an Apple Code, but I wasn’t sure why,
This number is often sent by text as a verification code to use,
when you are signing in to your Apple ID.
How it works: Two-factor authentication for Apple ID - Apple Support
If needed:
iCloud User Guide – Apple Support
How to contact:
Apple Support
All the best :-)