Apple Knows Their Products Best
Apple has wonderful documentation covering How to back up your Mac on their website, direct links can be found below:
Back up with Time Machine
Automatically back up all your files with Time Machine, which is built into your Mac.
Store files in iCloud
Use iCloud Drive to store and share files and learn how to access them on all your devices.
Restore your Mac from a backup
Use a backup to restore your files, even after the original files are deleted from your Mac.