Mac storage basics · Time Machine basics
Can Time Machine back up to a network drive or another Mac?
Short answer: Yes — a NAS with Time Machine support, or another Mac sharing a folder as a Time Machine destination. Add it with Add Backup Disk; the first backup is slow over Wi-Fi.
Yes. Time Machine can use a network share that supports it (many NAS devices offer a Time Machine option) or another Mac sharing a folder as a Time Machine destination (in that Mac's File Sharing settings). Choose it with Add Backup Disk in Time Machine settings.
Network backups are slower than a direct drive, especially the first one, so a wired connection helps.