I've had some trouble with this problem since I can't seem to know how to continue from certain point of my proof.
First of all, using Cauchy's theorem, we can assure that for every $p\mid |H|$ that is prime there exists an element of order $p$ in $H$, let that be $x$. Therefore, the subgroup $\langle x\rangle$ has order prime $p$, and so, every element different from $1$ of that group has to have order $p$ (since they all generate it). These are $p-1$ elements, and since our group has exactly that number of elements with order $p$, then these are all. Equivalently, $\forall p$ that is prime and divides $|H|, \exists!L\leq H$ of order $p$, and since every group of order prime is cyclic, it's the one we just described, and it is cyclic.
From this point, I've tried to see if for every divisor of the order of the group there exists only one subgroup of that order that is cyclic (and so, that the group is cyclic), but I can't seem to know how to prove it. I've also tried to see if this condition forces $H$ to have an element of order $H$, and so $H$ is cyclic, but I don't know how to prove that either. If anyone has any ideas on how to tackle this problem I would be really grateful, thanks.