There is generally four potential states that iCloud can be configured in on your Mac: 1) Not logged in to Apple Account, 2) Logged in but iCloud Drive not enabled, 3) iCloud Drive enabled, 4) iCloud Drive enabled and "Desktop & Documents" syncing enabled. You will want to determine how your Mac is currently configured.
Therefore, first check that you are logged into your Apple Account on that Mac. In System Settings, if you see your name at the top of the left column, then you are logged in, if instead you see "Sign In", then Set up iCloud on your Mac
Next, ensure that iCloud Drive is enabled on your Mac (Set up iCloud Drive - Apple Support). When enabled, you will see iCloud Drive listed in the Finder sidebar and it will allow you to see files that are in you iCloud Drive.
Despite seeing iCloud Drive in the sidebar, if you want your Mac's Desktop and Documents folders to be synched to iCloud, then you need to enable that feature specifically. That feature is described in Set up iCloud Drive - Apple Support.
If you have other folders on your Mac that are not contained with iCloud Drive, Desktop, or Documents folders, those files will not be synced to iCloud. If that is the case, you will need to move those folders to be within one of the synced folders. They will then appear when you check iCloud online.