Tools like Tailscale (built on WireGuard) give every device a private address and connect them directly, even behind home routers, without opening ports. Typical uses: reach a home server from anywhere, SSH to machines without public IPs, share a service with a friend.
curl -fsSL https://tailscale.com/install.sh | sh # read the script before piping to a shell
sudo tailscale up
tailscale status
tailscale ip -4
Trade-offs: the coordination (login, key exchange) is run by a vendor service unless you self-host an alternative such as Headscale; access rules and device keys must be managed; an exit node sends your traffic through another of your devices. For a few machines it is the quickest way to a secure private network.