On Windows, edit the tunnel in the WireGuard app and tick Block untunneled traffic (kill-switch). On Android, open Settings, Network and internet, VPN, tap the gear next to WireGuard, and turn on Always-on VPN and Block connections without VPN.
On iPhone, iPad and Mac, turn on On-Demand in the WireGuard tunnel settings so the tunnel restarts on every network. On Linux, add the reject rules from our Linux guide. On routers, use the router block option for non-VPN traffic.