Let $M^2 \subset \mathbb{R}^3$ be a manifold (surface, in this case), with regular boundary $\partial M$, such that $0 \notin \partial M$. In Do Carmo's book "Differential Forms and Applications", chapter $4$, question $3b$, he defines the solid angle under which $M^2$ is seen from $0$ as
\begin{align} \Omega = \int_{M^2}\omega, \end{align}
where \begin{align} \omega = \frac{x dy \wedge dz + y dz \wedge dx + z dx \wedge dy}{(x^2 + y^2 + z^2)^{\frac{3}{2}}}. \end{align} In the previous question, I've showed that if we restric the domain of $\omega$ to $M^2$, one can obtain: \begin{align} \left. \omega \right|_{M^2} = \frac{\cos \theta}{r^2} \sigma, \end{align} where $\sigma$ is the area element of $M^2$, $r$ is the distance from $0$ to a point $p \in M^2$ and $\theta$ is the positive angle from $O_p$ to the unit positive normal $N$ to $M^2$ at p.
The real question comes now: If $0 \notin M^2$, then of course $d\omega = 0$ (one can just do a calculation on the first way we describe $\omega$). Then, the book says that we can use this and Stokes Theorem to show that, in this case, $\Omega = 0$. But, the Stokes theorem states that, in this case, $$ \Omega = \int_{M^2} \omega = \int_{\partial M} \alpha, \ \text{where} \ d \alpha = \omega. $$ But how does this concludes that $\Omega = 0$? And we know that, locally, there is a $\alpha$, but as $M^2$ is not (necessarily) contractible, we can't apply the Poincaré's Lema.
The other problem is: If $0 \notin M^2$, then $\Omega = 4 \pi$. This looks suspiciously silly, because this is the surface area of the unit sphere. But when we write $$ \int_{M^2} \frac{\cos \theta}{r^2} \sigma, $$ how am I able to calculate this? Do we need to integrate on $S^2$? Is this notation this bad or I am making a huge deal of small things? How to properly calculate all of this things? I know, those are a lot of questions, sorry about that. Thanks in advance for any help!
The problem is Do Carmo has "swapped" his notation in the middle of the problem, and you haven't noticed this (not really your fault, I don't like his notation either). If you look at the problem again, for part (b) he says $M$ is a bounded region wit regular boundary $\partial M$. This means $M$ is a compact smooth $3$-dimensional manifold with boundary in $\Bbb{R}^3$ (think for example of a solid ellipsoid, and $\partial M$ is like the boundary elliptical surface). The problem is thus the following:
In the case where $0\notin M$, it means $M\subset \Bbb{R}^3\setminus \{0\}$, so by Stokes theorem, \begin{align} \int_{\partial M}\omega&=\int_Md\omega =\int_M0=0. \end{align} Again, note that we were able to invoke Stokes theorem since the manifold $M$ lies in $\Bbb{R}^3\setminus\{0\}$, where the 2-form $\omega$ is defined.
For the second case, you should justify why for sufficiently small $\epsilon>0$, \begin{align} \int_{\partial M}\omega&=\int_{S_{\epsilon}}\omega = \int_{S_1}\omega=4\pi \end{align} (here $S_{\epsilon}$ is the sphere of radius $\epsilon$ centered at the origin). In other words, you have to justify why $d\omega=0$ implies that we can deform the surface of integration from $\partial M$ to $S_{\epsilon}$, and then to $S_1$ (where the integral is "obviously" equal to $4\pi$). I won't write the details here, but for the intuition in one dimension lower, see the pictures I drew in this answer (and be careful with orientations).