A backup to iCloud does save information from your phone and it does include text messages. See About backups in iCloud and iTunes - Apple Support for information on what a backup includes. Note however that the backup to iCloud can only be used to do a full restore or to setup a new iOS device. You cannot access the contents of an iCloud backup in any other way.
In addition to iOS backups, iCloud can also be used to sync data between devices. That is not related to a backup. Syncing of various things is turned on via Settings > iCloud
Messages are not one of the things you sync via iCloud and there is no Messages app at icloud.com..
One method to print the messages would be to use iTunes instead of iCloud to do the backup. An iTunes backup is also meant only to be used to do a full restore or set up a new device but there are 3rd party extractor apps that can access it. One such app ishttps://www.wideanglesoftware.com/ibackupextractor/
They also have an app that they state will allow you to transfer messages directly to the computer from the phone without doing the iTunes backup step: https://www.wideanglesoftware.com/touchcopy/
I have not personally used either.
The following previous discussion may also help:
How can I print text messages for a court case? I need the date and times on the messages.