You can disable global discovery and relay in settings. You won’t get the benefits of this service, this could probably require you setup dyndns and/or static IPs as a replacement.
If you only want to stop the connection to discovery-v6.syncthing.net (if you don’t have ipv6) you can set global discovery servers to default-v4, it will still use the ipv4 version (if that is wanted, otherwise the answer of catfriend1 is the better solution).