See Sign Into iCloud to learn how to sign in to iCloud. If you’re not using the latest versions of macOS or iOS, see Update iOS and Check for and Install Updates on a Mac Computer before you continue.
If the switch was already on/green, your Mac’s calendar should already be synced to iCloud.