Given a surface vector $\text d \vec S=\text ds\, \hat n$ where $\hat n=\frac{\vec\nabla\vec f}{|\vec\nabla\vec f|}$. Our surface can be defined to be at an angle $\theta$ to the $xy$ plane such that $\cos\theta=\hat n\cdot\hat k$ thus we can rewrite $\text d\vec S$ as:
$$ \text dx\,\text dy = \text dS \cos\theta = \text dS (\hat{n} \cdot \hat{k}) = \text d \vec{S} \cdot \hat{k} $$
When evaluating a surface integral $\int_s\psi(x,y,z) \text dS$ we can use the above relation to change it to $\text dx \text dy$
You can integrate integrate over a solid angle such that:
$$ \text d\Omega=\sin(\theta)\, \text d\theta \text d\phi $$
For a general surface we have:
$$ \text d\Omega = \hat{r} \cdot \hat{n} \frac{\text dS}{r^2} = \frac{\hat{r}\cdot \text d\vec{S}}{r^2} $$
$$ \text{Flux}=\int_S \vec A \cdot \text d\vec S=\int_S\vec A\cdot\hat n\, \text d S $$
🦏 Properties:
The divergence theorem related the total flux of a vector field ($A)$ through a closed surface $\vec S$ to the divergence of the vector field inside the volume $V$, bound by the surface:
$$ \int_S\vec A\cdot\text d\vec S=\int_V\vec \nabla\cdot \vec A\,\text dV $$