Backups, by definition, should be offline, offshore and incremental with a reasonable backup window, so if you notice that you lost a file (not only cause a ransomware but also by human error) AFTER the last backup you can go back to a previous backup set and restore it before corruption/encryption/accidental deletion/etc. You also need to keep you backups physical disconnected from the PC that you are backing up when not strictly required, because a ransomware can encrypt them if it have write access to them.
Some practical way to do it in a domestic environment are:
if you use a cloud backup ensure that it support file versioning, so you can restore a previous version of a file if needed (also check if you can do it massively, discover that you must to do file-by-file when you need to restore 100k files can be a pain...)
If you use a USB device use an incremental backup software that make you able to speed up backing up only the files that was changed by last backup. You can also use 2+ USB drives and rotate them, so if one is damaged by a ransomware you have another physical copy to restore (maybe old but better than nothing)
Lots of other solution are available, but they depends on you personal needs and your budget.
In a domestic environment, if you have small amount of important data that don't changes often, you can also use optical supports (CD/DVD/BluRay) that can't be directly overwritten by a malicious software (even RW supports need a format process before).