Galois representation is supposedly of much interest in number theory; many say that number theory is about `understanding' $\text{Gal}(\bar {\mathbb Q} |\mathbb {Q} )$ . I'd like to know how this is supposed to help us answer elementary number-theoretic questions.
I know two examples of how Galois group helps elementary number theory, but I cannot extract the general reason why it is effective from these examples.
Primes of the form $x^2+ny^2$ : In order to find primes $p$ of the form $p=x^2+ny^2$, we need to use class field theory, where Galois group is compared to ideal class group. There is a book about this topic.
Fermat's Last Theorem : This was proved through showing that a solution $a^n+b^n=c^n$ implies that $y^2 = x(x-a^n)(x+b^n)$ is not modular, whereas actually every elliptic curve is modular (induces Galois representation that is also induced by modular form). Thus, the key link between elementary number theory (solving $a^n+b^n=c^n$) and Galois representation here is the non-modularity of Frey curve. As far as I know, such non-modularity is not trivial, and thus it is again mysterious to me why Galois representation is important for elementary number theory.
What is the universal reason why Galois group helps us solve diophantine equations or deal with quesitons about primes?
This question was already asked, and redirected to this MO question. However, I don't think that the question is answered satisfactorily (it does mention that Galois representation helps us understand Galois group, but I can't really understand from the answer why Galois group helps us do number theory), so I'd like to ask for an answer once again.