What I have in mind in order to make it more concrete are the groups of order 8. We know that there are 5 groups of order 8 in total, 3 abelian and 2 non-abelian and we know their full structure as well. We also know that they can be thought of as the Galois group of some extension over $\mathbb{Q}$ (for example every p-group has that property, but here the situation is much more trivial I think to need such a theorem).
My intuition tells me that there is not a single type of polynomials for which those groups can be realised as Galois groups of those polynomials. For example take $D_4$, the dihedral group of the square. Now $D_4$ can be thought of a Galois group of $f(x)=x^4-2$ over $\mathbb{Q}$ or of a polynomial of degree 8 $f=x^8−3x^5−x^4+3x^3+1$, so even the degree of the polynomial is not fixed.
So my question is certainly not to find all the polynomials for which their Galois group is $D_4$, but find at least one.
To put it simply, my question is this. Given a finite group H which you know it is Galois group over $\mathbb{Q}$, if you know the group's structure/representation etc, is there any way to find a polynomial whose Galois group is H? If yes, what part of the group's structure do you need?
For the groups of order 8 for example, $D_4$ is $f(x)=x^4-2$, for $\mathbb{Z}_8$ my guess would be the cyclotomic $\phi_8=x^4+1$ and what's left is $\mathbb{Z_2}\times \mathbb{Z_4}$, $\mathbb{Z_2}\times\mathbb{Z_2}\times\mathbb{Z_2}$, which are abelian and the quaternion $Q_4$ which is non-abelian. I 'd like to think that if I work on it I 'd probably be able to find polynomials for the abelian groups but i have no idea what i would do for the non-abelian.