NAS devices typically include Time Capsule emulation using SMB3 instead of the old Apple File Protocol AFP. They do this by using SAMBA a UNIX SMB service. SMB (CIFS) is Small Message Block but it is known as sharing in Windows. i.e. network drive connectivity. Apple adopted SMB and now they are removing AFP.
I created my own Ubuntu Server with 8 drive bays. I created a zpool for ZFS (software RAID that is bullet proof), setup Linux native containers (LXD). Created a container to be a Time Capsule. Setup mDNS, Samba and it broadcasts it's presence on the LAN to the Macs. Created users in Samba for each Mac user and set permissions.
On the Macs you go to Settings > Time Machine and click the + and you will see the Time Capsule you created. Select it and use it. Each user will have a directory created on the Time Capsule. Each Mac will then create a sparse disk image for the backups. ZFS has a dataset volume for Time Capsule that restricts how much storage to use. I set mine to 2TB. It's been working for years without issue. I even setup a second server and use ZFS send / receive to snapshot the Time Capsule ZFS storage and delta copy it to the second server to backup the Time Machine.
Synology and others are using Linux under the hood and are doing much the same thing to create a networked Time Machine.
Now I realize that this is super nerdy and likely overkill. So I would recommend a Synology or QNAP NAS be something you consider purchasing in the near future. It's a no brainer, all the hard work I described is done for you. It's an appliancce.
You can use it for more than just Time Machine. You can create your own little private cloud on the NAS. Add Tailscale and you reach it from anywhere outside your home. Tailscale (among other competitors) is a new type of VPN solution. It uses WireGuard technology but it adds mesh networking and access control lists for permissions. Tailscale is free for personal use. It's drop dead simple to setup and get it working. Lots of excellent documentation about how to do more advanced things with Tailscale. NOTE: Tailscale is not a VPN competitor. They do not have exit nodes around the world. This is more a private VPN solution to protect your LAN and perhaps interconnect multiple LANs. You could put Tailscale on an AppleTV. Configure it. Ship the AppleTV to your family member overseas. They connect it to their TV and network. Now you have an exit node to your family member overseas. But yeah, it doesn't compete with the likes of NordVPN, etc. It's really designed for small business but they offer a free tier that is quite sufficient.