Use the 3-2-1 strategy. 3 backups on 2 different media with 1 offsite location.
For code I use github, my NAS and burned blurays (readonly, offsite).
Syncthing is a handy tool for smaller files (e.g. documents) to distribute over multiple clients, e.g. your Android phone.
Restic is good for encrypted, deduplicated cloud backup.
ZFS can also be helpful when used with zfs-auto-snapshot or zrepl to prevent accidental data loss or ransomware attacks.