Syncthing - https://syncthing.net/
Before I explain my setup, realize a simple one-way, two-device setup can be done quickly and easily. https://docs.syncthing.net/intro/getting-started.html
I have it set up on my phone (android), desktop (Devuan), laptop (MX Linux), and a server (DietPi).
I have the DCIM picture folder synced one-way from the phone to the server, and one-way from the server to the desktop and laptop. As soon as a new picture is taken and a network is in range, the photo is synced.
I also have separate sync folders set up for other purposes: "music" - all-way, all devices. "keyring" for password manager - all-way except one-way to phone. "sync" - All-way, all devices except phone. "syncmobile" - all-way, all devices
Right now sync only happens over WiFi connections (local and remote) for "reasons". It's been that way for years and it's been enough. I'm still contemplating cellular data.