What are you using for your main backup? It probably has a feature for doing remote backup / duplication. You're best off using that.
If you don't, then I think that's probably your first order of business. There are a bunch of good COTS NAS devices that support remote backup to a similar device or to the cloud. Synology generally seems to be the easiest to use based on reviews, but recently they've been getting picky about hard drive support.
If you'd rather DIY then there are some FOSS software options to let you build your own NAS and then back it up to the cloud or to a remote device running the same software. These can get pretty complicated from what I can tell (I'm in the process of doing something similar, been researching). Options include OpenMediaVault, and TrueNAS. TrueNAS seems to be "better" but more complicated and easy to fuck up.
Unraid is also very popular, but it costs money to get a software license. Users swear by it, though.
And on the outside HexOS - a fork (or maybe alternative front end?) of TrueNAS, by some former Unraid devs, with the goal of making TrueNAS as easy to use as Unraid. But it's both paid and beta, so probably not a good choice yet.
These will all allow remote backup to cloud or to a remote device running the same software. They also typically support some kind of virtualization with an app store, so you can use your NAS to host other servers like a media server or immich or home assistant, etc (although app ecosystem abundance will vary).
Wrt hardware, you'll have to look up system requirements for the software you want to use. For example, TrueNAS uses ZFS filesystem, which wants a lot of ram if you need it to perform well.
If your r-pi can run the software you want, then you can get a SATA hat for your pi, to run a couple hard drives. You can also get NAS cases for your pi.
I probably wouldn't recommend leaving a mess of cables and parts at your friend's house across the country, it's better for both of you if the system is fairly well contained - enough for them to move it without risk of parts getting disconnected.