From the full connected fraph with $n$ vertices choose the subgraph $G = G (n, p)$ in such a way that each edge is independently selected with a probability of $p$ or not selected with a probability of $1 - p$. For the resulting graph G find $\operatorname{Var}$ of the number of isolated vertices.
My attempt:
Let $X_j$ be random variable for which if $X_j = 1$ then $ v_j $ is isolated. Otherwise $X_j=0$
$$\operatorname{Var}(X) = \operatorname{Var}(\sum_{v}X_v) = E\left(\left(\sum_vX_v\right)^2\right) - E^2 (\sum_v X_v)$$
Ok, so if it comes to
$$E^2 (\sum_v X_v)) = n^2 \cdot E^2(X_1) = n^2(1-p)^{2n-2}$$
Now $E\left(\left(\sum_vX_v\right)^2\right)$:
$$ E\left(\left(\sum_vX_v\right)^2\right) = \left(E(X_1+ \cdots +X_n)^2\right) = E\sum_{u,v}X_uX_v = \\ \underbrace{E\sum_{u \neq v}X_uX_v}_{(*)} + \underbrace{E\sum_{u = v}X_uX_v}_{(**)}$$
and now by combinatoric interpretation $(*)$ is $n(n-1)(1-p)^{2n-3}$.
If it comes to $(**)$ there is $n EX_1^2 = \color{red}{n(1-p)^{2n-2}}$
So gathering all together:
$$-n^2 (1-p)^{2 n-2}+(n-1) n (1-p)^{2 n-3}+n (1-p)^{\color{red}{2n-2}} $$
but the correct answer is
$$-n^2 (1-p)^{2 n-2}+(n-1) n (1-p)^{2 n-3}+n (1-p)^{\color{red}{n-1}} $$
Where did I fail?
You got $E\left(X_1\right)=(1-p)^{n-1}$ right the first time you needed it, and then you correctly squared it to obtain $(1-p)^{2n-2}$; but then the second time you need it, since $E\left(X_1^2\right)=E\left(X_1\right)$, it isn't squared, and you still wrote $(1-p)^{2n-2}$, but it should be just $(1-p)^{n-1}$.