Let $K/\mathbb Q$ be a finite Galois extension with Galois group $G$, ring of integers $\mathcal O_K$ and $\mathcal Cl(K)$ its ideals class group. I want to show that $\mathcal Cl(K)^G$ is generated by the following classes: $$[\prod_{\substack{\mathfrak m\in\mathrm{Max}(\mathcal O_K)\\\mathfrak m\mid p}}\mathfrak m]$$ where $p$ runs over the primes of $\mathbb N$ that are ramified in $K$.
Here is what I did. Obviously the reverse inclusion is trivial. Let $I$ be an ideal of $\mathcal O_K$ and $[I]$ be its class in $\mathcal Cl(K)$. Write its prime decomposition in maximal ideals of $\mathcal O_K$: $$I=\mathfrak m_1^{n_1}\cdots\mathfrak m_s^{n_s}.$$ Since for every $\sigma\in G$, one has $\sigma([I])=[I]$ that means there exists $\alpha_\sigma\in K^*$ such that $\sigma(I)=\alpha_\sigma I$.
I know that $G$ acts transitively on the maximal ideals of $\mathcal O_K$ above the same prime $p\in\mathbb N$, but I do not know how to use this to conclude.
Any hint would be welcome
Thanks in advance
The statement you are trying to prove is not true.
E.g. suppose that you take $K = \mathbb Q(\sqrt{34})$.
Then the ramified primes are principal:
$6 + \sqrt{34}$ is an element of norm $2$
$17 + 3\sqrt{34}$ is an element of norm $-17$.
In particular, they have trivial image in the class group. On the other hand, the group of $G$-invariants has order two. (I think it is generated by the class of an ideal of norm $3$.)
The fact that this is a counterexample is related to the fact that $-1$ is a norm from $K$ (e.g. it is the norm of $\dfrac{5 -\sqrt{34}}{3}$) but not a norm from $\mathcal O_K$.
Your question in general is related to the ambiguous class number formula. This exercise sheet has more information on that topic (including the theory for real quadratic fields, of which the above counterexample is a special case).