Desktop Macs should get backed up via Time Machine (TM) to an external drive permanently connected to it.
For MacBooks, using an external hard drive is feasible (and recommended) but not super practical.
Another solution for MacBooks (especially those without a built-in SD card slot) is to invest in a Network Attached Storage (NAS) solution, like those from Synology.