Of all the P2P file transfer tools I’ve tried (Magic Wormhole, file.pizza, localsend, etc) I’ve had the best luck with croc working under various network configurations.
For local transfers (mainly between my phone, pc and laptop) I've been using LocalSend, works great.