Step 1. Gauss's law connects the electric flux passing through any closed surface to the total charge enclosed inside that surface.
Step 2. The law is written as \(\Phi_E = \oint \vec{E} \cdot d\vec{A} = \dfrac{q_{enc}}{\epsilon_0}\), where \(q_{enc}\) is the net charge enclosed and \(\epsilon_0\) is the permittivity of free space.
Step 3. This means the flux does not depend on the shape or size of the closed surface, and it does not depend on charges lying outside the surface. Only the charge trapped inside matters.
Step 4. If the closed surface encloses zero net charge, that is \(q_{enc} = 0\), then substituting into the formula gives \(\Phi_E = 0\). Any field lines entering the surface must also leave it, so the net outward flux is zero.
Answer. The flux equals the enclosed charge divided by \(\epsilon_0\), that is \(\Phi_E = q_{enc}/\epsilon_0\), and it is zero when no net charge is enclosed.