As @Caboose12000 already said, I’d recommend drop.lol (can be selfhosted). Filetransfers are direct between peers (unless you’re behind some hardcore NAS where UDP hole-punching via STUN is not possible).
I mean how I transfer a file depends on the situation. If it’s to someone on XMPP I’d just establish a direct transfer there. Sometimes I share a directory over HTTP, FTP, SFTP and so on. The easiest way for most people, because it only requires a WebRTC capable browser, is with one of the many peer to peer filesharing platforms like drop.lol.
I use resilio sync across my work and personal phones and I use it to backup my phones to my nas. No need to turn it on/off, it’s accessible only via secret key or shared link and it’s encrypted.
I know sync isn’t foss but it’s the best one I’ve found over the years and it just works.
Love resilio. Fantastic for travelling to quickly pull up your passport or visa or train tickets you reserved before. Just leave a computer running at home (like a home server).
Mobius Sync is an iOS app for it. Free version has max directory size 25mb(?) but dev seems to have good attitudes; it’s something I wouldn’t mind paying for.
It’s a bit more consumer focused, easier for Grandma kind of thing. Syncthing isn’t hard, but does have in my opinion a bit more difficult of an initial setup with features like introducers that can make things difficult if configured wrong.
I never see toffeeshare mentioned. P2P, encrypted, no size limit. Only problem is you can’t send folders, only files, but that’s easily solved with tarballs or RARs.