See the article Other ways to back up and restore files - Apple Support
Use cloud-based services
Cloud-based services don't require you to connect an external hard drive to your Mac. For example, iCloudcan automatically store your photos, calendars, contacts, notes, passwords, and more. And it includes iCloud Drive, which can store documents, desktop files, and other files of your choosing. To access those files, you just need to be signed in to iCloud. Other cloud-based services are available from third parties.
Note : you can't back up Mac system files to iCloud for complete back up the time machine has to be set up How to back up your Mac - Official Apple Support