My teacher gave me an example of performing the subject:
Example
Let $\Omega = \Bbb R$ and $\mathcal R = \{(-\infty,-1),(1,+\infty)\}$. Then $\sigma(\mathcal R) = \{\emptyset, \Bbb R, (-\infty,-1), (1,+\infty), [-1, \infty), (-\infty,1], (-\infty,-1)\cup(1,+\infty),[-1,1]\}$.
There was a different example, where she also generated the smallest $\sigma$-algebra for the family of sets $\mathcal A = \{A,B\} \subset 2^\Omega$ in the same way: $\sigma(\mathcal R) = \{\emptyset, \Omega, A, B, A^C,B^C,A\cup B, (A\cup B)^C\}$.
I certainly understand why $\emptyset$, $\Omega $ and a family of sets itself are there, and I certainly know that $\sigma$-algebra is closed under the operations of complement and union. What I don't understand about the other elements of generated $\sigma$-algebras: why we are taking exactly them? Does this work in a general case?