As per documentation: For local development with wrangler dev, variables in wrangler.toml are automatically overridden by any values defined in a .dev.vars file located in the root directory of your worker. This is useful for providing values you do not want to check in to source control.
Alternatively, you can specify per-environment values in wrangler.toml and provide an environment value via the env flag when developing locally like so wrangler dev --env=local.