Back up and restore your Mac
To keep your files safe, itβs important to back up your MacBook Pro regularly. The easiest way to back up is to use Time Machineβwhich is built into your MacBook Proβwith an external storage device connected to your MacBook Pro. Time Machine can also back up your Mac contents to supported network volumes. For a list of devices supported by Time Machine, see the Apple Support article Backup disks you can use with Time Machine.
Files stored in iCloud Drive and photos in iCloud Photos are automatically backed up to iCloud and donβt need to be part of your Time Machine or other backup.
Tip: You can use a shared Mac thatβs on the same network as your MacBook Pro as a backup destination. On the other Mac, go to the Sharing pane of System Preferences, then turn on File Sharing. Add a shared folder, secondary click (that is, right-click) the folder, choose Advanced Options, then click βShare as Time Machine backup destination.β
Set up Time Machine. Make sure your MacBook Pro is on the same Wi-Fi network as your external storage device, or connect your external storage device to your MacBook Pro. Click the System Preferences icon in the Dock, click Time Machine, then select Back Up Automatically. Select the drive you want to use for backup, and youβre all set.

Time Machine:
Automatically backs up everything on your MacBook Pro, including system files, apps, accounts, preferences, music, photos, movies, and documents.
Remembers how everything looked on any given day, so you can revisit your MacBook Pro as it appeared in the past or retrieve an older version of a document.
Lets you restore your MacBook Pro from a Time Machine backup. So if anything happens to your MacBook Pro, your files and settings are safe and sound.
Learn more. See Back up your files with Time Machine in the macOS User Guide.