You are considering a random sample of size $N$. Each draw $i$ performed independently of any other draw $j$. Each draw is a draw of a random vector $(Y_i,X_i)$. Here is an illustration of all the stochastic vectors under consideration:
$$(Y_1,X_1),(Y_2,X_2),...,(Y_N,X_N)$$
As already mentioned $(Y_i,X_i)$ is independent of $(Y_j,X_j)$ for any pair $i \not =j$. So $(Y_1,X_1)$ is independent from $(Y_2,X_2)$. This means that $Y_2$ is independent of $Y_1$ and $X_1$ and $X_2$ is independent of $Y_1$ and $X_1$.
$$f(Y_1,X_1,Y_2,X_2) = f(Y_1,X_1)f(Y_2,X_2)$$
integrate out $X_1$ and $X_2$ to get
$$f(Y_1,Y_2) = f(Y_1)f(Y_2)$$
But for each $i$ it is NOT the case that $Y_i$ is independent of $X_i$ the could be draws from multivariate normal with non-zero covariance.
Assuming further they are all drawn from the same distribution so for all $i$ the vector $(Y_i,X_i)\sim(Y,X)$, which is simply one convenient way of saying that all the vectors $i=1,...,N$ follows same distribution.
So we have
(1) Dependence between $Y_i$ and $X_i$ for all $i$
(2) Independence for $(Y_i,X_i)$ and $(Y_j,X_j)$ for all $i\not=j$
(3) Identical distribution $(Y_i,X_i)\sim(Y,X)$ for all $i$
Define
$$Y_i = a + X_i z_i$$
with $z_i \sim \mathcal N(0,\sigma^2)$
then $Y_i \lvert X_i$ is normal and have mean $\mathbb E[Y_i \lvert X_i]$ and variance $Var(Y_i \lvert X_i)$. Calculate the mean
$$\mathbb E[Y_i \lvert X_i] = a + X_i\mathbb E[z_i \lvert X_i] = a$$ where the last step follows from assuming that $z_i$ is independent of $X_i$ so $\mathbb E[z_i \lvert X_i] = \mathbb E[z_i] = 0$.
Calculate variance
$$Var(Y_i\lvert X_i) := \mathbb E[(Y_i - \mathbb E[Y_i\lvert X_i])^2 \lvert X_i] \\
\mathbb E[(X_iz_i - \mathbb E[X_iz_i\lvert X_i])^2\lvert X_i]
\\ \mathbb E[(X_i^2(z_i - \mathbb E[z_i\lvert X_i])^2\lvert X_i]$$
use independence of $z_i$ and $X_i$ to get
$$= \mathbb E[(X_i^2(z_i - \mathbb E[z_i])^2\lvert X_i] \\
= X_i^2 \mathbb E[(z_i - \mathbb E[z_i])^2\lvert X_i] \\
= X_i^2 \mathbb E[(z_i - \mathbb E[z_i])^2]\\
= X_i^2 \sigma^2 $$
If your model is
$$Y_i = a + u_i$$
then $u_i = X_i z_i$ and is not independent of $X_i$.
hope that answers some of your confusion, sorry for being repetitive.