In the book "Rational Points on Elliptic Curves by J.Silverman and J.Tate" it is defined a representation $$ \rho_n:Gal(\mathbb{Q}(E[n])/\mathbb{Q})\longrightarrow GL_2(\mathbb{Z}/n\mathbb{Z})\hspace{0.2cm}\forall n\geq 2$$
with $\mathbb{Q}(E[n]):=\mathbb{Q}(x_1,y_1,...,x_{n^2-1},y_{n^2-1})$, where $E[n]=\{O,(x_1,y_1),...,(x_{n^2-1},y_{n^2-1})\}$
But in other refferences i saw $\rho_n:Gal(\overline{\mathbb{Q}}/\mathbb{Q})\longrightarrow GL_2(\mathbb{Z}/n\mathbb{Z})\hspace{0.2cm}\forall n\geq 2$
I know $\mathbb{Q}(E[n])\subset \overline{\mathbb{Q}}$ beacuse $\mathbb{Q}(E[n])/\mathbb{Q}$ is algebraic, in fact, it is Galois.
Which Galois group should i use?
The map $\operatorname{Gal}(\overline{\mathbb Q}/\mathbb Q)\to\operatorname{GL}_2(\mathbb Z/n\mathbb Z)$ factors through $\operatorname{Gal}({\mathbb Q}(E[n])/\mathbb Q)\to\operatorname{GL}_2(\mathbb Z/n\mathbb Z)$. So it's not really a matter of which Galois group to use, it's a matter of what you're doing. If $n$ is fixed, it's often easier to use the finite Galois group; but if you're going to take a sequence of increasing values of $n$, e.g., $n=\ell^k$ with $k\to\infty$, then you're better off using the Galois group of $\overline{\mathbb Q}$ so that you don't have to keep switching groups.