basically would need a NAS
on macos you can do this simply with the time machine app
maybe next cloud / mycloud could also provide something like that
https://rsnapshot.org/
https://9to5mac.com/2023/03/31/how-to-backup-iphone-ipad-mac/#h-backup-iphone-and-ipad-with-third-party-options
https://www.urbackup.org/