how does the dark energy affect the universe (why we usually related them with universal expansion)
To answer your second question, you need to look at the acceleration equation.
$$\frac{\ddot a}{a}=-\frac{4\pi G}{3c^2}\sum_i(\varepsilon_i + 3w_i\varepsilon_i)$$
$$\frac{\ddot a}{a}=-\frac{4\pi G}{3c^2}\sum_i\varepsilon_i(1 + 3w_i)$$
Where $\varepsilon_i$ represents the energy density and $w_i$ equation of state parameter where $i = m, r, \Lambda$
For simplicity let me denote the sum as $K$ such that $K \equiv \sum_i\varepsilon_i(1 + 3w_i)$. In this case the acceleration equation reduces to
$$\frac{\ddot a}{a}=-\frac{4\pi G}{3c^2}K$$
Now by looking at this equation, it's very clear that if $K>0$ the universe decelerates, and if $K<0$, the universe accelerates.
Let me calculate the $K$ for two types of universe.
$1$ - Universe with $\varepsilon_{\Lambda} = 0$
In this universe model, you'll see that
$$K = \sum_i\varepsilon_i(1 + 3w_i) =2\varepsilon_r+\varepsilon_m > 0$$ which is clearly positive, since $\varepsilon_r > 0$ and $\varepsilon_m > 0$
This implies that, this type of universe decelerates.
$2$- Universe with $\varepsilon_{\Lambda} \ne 0$
At this point we should ask, what do we need to have an accelerated universe ?
Well, we need to satisfy $K<0$ as I have mentioned before. To do that, let me set a simple inequality.
$$K < 0 \rightarrow 2\varepsilon_r+\varepsilon_m + \varepsilon_{\Lambda}(1+3w_{\Lambda}) <0$$
If we assume that $\varepsilon_{\Lambda}$ is positive, to have an accelerating universe the only possible solution becomes $$1+3w_{\Lambda}<0$$
Or $$w_{\Lambda} < -1/3$$
So, to have an accelerated universe we need some sort of material where its equation of state parameter is less than $-1/3$. Dark energy is some sort of "energy" which satisfies this condition and allows an expanding universe model.
Current favoured dark energy model sets $w_{\Lambda} = -1 < -1/3$.
In this case we have,
$$K = 2\varepsilon_r+\varepsilon_m -2 \varepsilon_{\Lambda}$$
As the universe expands $\varepsilon_r$ and $\varepsilon_m$ decreases but $\varepsilon_{\Lambda}$ remains the same. This allows $K$ to be negative at some point in the history of the universe.