Phrased like that, it looks hard. But one can see that $$\tag1 \mathcal G=\\{O:\ O\mathcal X=\mathcal X\\}, $$ where $\mathcal X$ is the range of $X$.
Now the equality $O\mathcal X=\mathcal X$ is the same as $O^T\mathcal X=\mathcal X$, and if $U,V\in\mathcal G$ then $UV\mathcal X=U\mathcal X=\mathcal X$. So $\mathcal G$ is a group.
* * *
_Proof of $(1)$_
If $O\mathcal X=\mathcal X$, then for any $v\in\mathbb R^p$, there exists $w\in\mathbb R^p$ with $OXv=Xw$; as $HX=X$, we get $HOXv=HXw=Xw=OXv$. As this works for all $v$, we get $HOX=OX$.
Conversely, if $HOX=OX$, then for any $v\in\mathbb R^p$ we have $OXv=HOXv\in\mathcal X$. So $O\mathcal X\subset \mathcal X$. As $O$ preserves dimension (being injective), $O\mathcal X=\mathcal X$.