I looked at a proof of Gauss's law, as seen here:
Theorem - The flux of a point charge. Given a point charge $q$ and a surface surrounding it, the flux through the surface is just $\frac{q}{\epsilon_{0}}$. To prove this proposition we first consider a spheircal surface of radius $r$. We get $$\Phi=\int_{S} \boldsymbol{E} \cdot d \boldsymbol{a}=\int \frac{q \hat{\boldsymbol{r}}}{4 \pi \varepsilon_{0} r^{2}} \cdot r^{2} \sin \theta d \theta d \varphi \hat{\boldsymbol{r}}=\frac{q}{\varepsilon_{0}}$$ As we wanted. Moving to a general closed surface $G$ containing $q$, we first find a small spherical surface $S$ of radius $r$ around $q$ that is contained in $G$. The rays starting from the point charge $q$ passing through the surface element $\boldsymbol{\Delta a}$ of $S$ project in onto a surface element $\boldsymbol{\Delta A}$ of $G$. If $\boldsymbol{R}$ is the vector distance between $q$ and $\Delta A$, $\cos \theta$ is the angle between $\boldsymbol{R}$ and $\boldsymbol{\Delta A}$, i.e. $\cos \theta = \hat{R}\cdot \boldsymbol{\Delta A} /\Delta A$, then $$\Delta A=\Delta a\left(\frac{R}{r}\right)^{2} \frac{1}{\cos \theta}$$the electric field at $\boldsymbol{\Delta a}$ is $$\boldsymbol{E}(\boldsymbol{r})=\frac{q \hat{\boldsymbol{r}}}{4 \pi \varepsilon_{0} r^{2}}$$ ad at $\boldsymbol{\Delta A}$ is $$\boldsymbol{E}(\boldsymbol{R})=\frac{q \hat{\boldsymbol{R}}}{4 \pi \varepsilon_{0} R^{2}}$$ consequently the flux through $\boldsymbol{\Delta A}$ is $$\begin{aligned} \Phi(\Delta \boldsymbol{A}) &=\boldsymbol{E}(\boldsymbol{R}) \cdot \Delta \boldsymbol{A}=\frac{q}{4 \pi \varepsilon_{0} R^{2}} \hat{\boldsymbol{R}} \cdot \Delta \boldsymbol{A} \\ &=\frac{q}{4 \pi \varepsilon_{0} R^{2}} \cos \theta \Delta A \\ &=\frac{q}{4 \pi \varepsilon_{0} R^{2}} \cos \theta \Delta a\left(\frac{R}{r}\right)^{2} \frac{1}{\cos \theta} \\ &=\frac{q}{4 \pi \varepsilon_{0} r^{2}} \Delta a \\ &=\Phi(\Delta \boldsymbol{a}) \end{aligned}$$
In the proof of the general case, we use some strange geometry: $$\Delta A=\Delta a\left(\frac{R}{r}\right)^{2}\frac{1}{\cos\theta}$$ I'm having a hard time understanding why this is correct. I know it has something to do with the term "Solid Angle", but I'm unsure what it is exactly (I saw the the definition but I don't understand where it appears here).
So I'd also appreciate it if you could explain a bit about solid angles and perhaps provide some intuition.
I've visited posts such as thisthis one, that show $\Omega = \frac{A}{R^2}$ as the definition of a solid angle, but I don't see why that's useful and where it appears in my case.