This is my setup
sabnzbd:
...
restart: unless-stopped
network_mode: "service:gluetun"
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=custom
- VPN_TYPE=wireguard
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 9090:8080 # SABnzbd webui port forwarding
volumes:
- ./Wireguard/wg0.conf:/gluetun/wireguard/wg0.conf:ro
restart: unless-stopped
Note how i explicitly tell sabnzbd container to use gluetun as a network.
Afaik, with your setup you simply run both containers in the same network so that both can reach each other.

Interesting video regarding the topic: https://m.youtube.com/watch?v=j4OKo0VpoeM