which rule or definition apply ${\displaystyle {\begin{aligned} \operatorname {E} [Y_{i}^{2}] = (\sigma ^{2}+\mu ^{2}) \quad (3.1) \end{aligned}}}$ I am learning the justification of Sample variance

$${\displaystyle {\begin{aligned}
\operatorname {E} [\sigma _{Y}^{2}]&amp;=\operatorname {E} \left[{\frac {1}{n}}\sum _{i=1}^{n}\left(Y_{i}-{\frac {1}{n}}\sum _{j=1}^{n}Y_{j}\right)^{2}\right] \quad (1.1)\\[5pt]
&amp;={\frac {1}{n}}\sum _{i=1}^{n}\operatorname {E} \left[Y_{i}^{2}-{\frac {2}{n}}Y_{i}\sum _{j=1}^{n}Y_{j}+{\frac {1}{n^{2}}}\sum _{j=1}^{n}Y_{j}\sum _{k=1}^{n}Y_{k}\right ] \quad (1.2)\\[5pt]
&amp;={\frac {1}{n}}\sum _{i=1}^{n}\left[{\frac {n-2}{n}}\operatorname {E} [Y_{i}^{2}]-{\frac {2}{n}}\sum _{j\neq i}\operatorname {E} [Y_{i}Y_{j}]+{\frac {1}{n^{2}}}\sum _{j=1}^{n}\sum _{k\neq j}^{n}\operatorname {E} [Y_{j}Y_{k}]+{\frac {1}{n^{2}}}\sum _{j=1}^{n}\operatorname {E} [Y_{j}^{2}]\right] \quad (1.3)\\
&amp;={\frac {1}{n}}\sum _{i=1}^{n}\left[{\frac {n-2}{n}}(\sigma ^{2}+\mu ^{2})-{\frac {2}{n}}(n-1)\mu ^{2}+{\frac {1}{n^{2}}}n(n-1)\mu ^{2}+{\frac {1}{n}}(\sigma ^{2}+\mu ^{2})\right] \quad (1.4)\\
&amp;={\frac {n-1}{n}}\sigma ^{2}
\end{aligned}}}$$

that post is discussing how equation (1.2) would conduct to equation (1.3)

in this post, i am trying to understand how equation (1.3) would conduct to equation (1.4)

It seems that the procedure contains following equation

$${\displaystyle {\begin{aligned}
\operatorname {E} [Y_{i}^{2}] = (\sigma ^{2}+\mu ^{2}) \quad (3.1)
\end{aligned}}}$$

does equation (3.1) hold? if yes, which rule or definition apply here?
By definition $\sigma^{2}=EY_i^{2}-(EY_i)^{2}=EY_i^{2}-\mu^{2}$. Just add $\mu^{2}$ to both sides.
the Definition part of wiki you linked gives the answer