An abelian group of order 6 has an element of order 6.
Let $ G $ be an abelian group of order 6.
Then $ G $ has one element of order 6.
And so, $ G $ is cyclic and isomorphic to $ \mathbb Z _6 $.
In general, It is not true that an abelian group of order $n$ has an element of order $n$.
However in the case of $n=6$, it is true. I'm wondering there is any rule of the case (for example, a rule of $n$ that makes an abelian group cyclic).
By Cauchy's Theorem $G$ has elements $x,y$ of order $2$ and $3$. Then $xy$ has order $6$ by abelianness.
If you have an abelian group containing an element of order equal to the size of group, then it will imply the group to be cyclic. So any abelian group that is not cyclic will not have this property.
By the structure theorem of finite abelian groups, we have that an abelian group of order $n$ is a product:
$$G \cong \prod_{i = 1}^k \Bbb Z_{n_i}$$
such that $\prod\limits_{i=1}^k n_i = n$, and each $n_i = p_i^{e_i}$ is a power of a prime.
Therefore, the order of an element $g$ of $G$ can at most be $\operatorname{lcm}(n_1, \ldots, n_k)$, the least common multiple of the $n_i$ (in fact, this order will be attained by the element $(1,\ldots, 1)$ as one easily verifies).
Thus our question reduces to finding conditions on $n$ such that $\operatorname{lcm}(n_1,\ldots,n_k) = n$; equivalently, that all $n_i$ are coprime.
This can only be ensured when $n$ is squarefree; otherwise, there is a prime $p$ such that $p^2 \mid n$, and we have the group $\Bbb Z_p \times \Bbb Z_p \times \Bbb Z_{n'}$ with $n' = n/p^2$ in which no element has order $n$.
In conclusion, an abelian group $G$ has an element of order $n = |G|$ if $n$ is squarefree. For groups of non-squarefree order $n$, there may be such an element (e.g. in $\Bbb Z_n$ there is) but in some groups of order $n$ there won't be.
(In particular, it follows that all abelian groups of squarefree order $n$ are cyclic, i.e. isomorphic to $\Bbb Z_n$. Thus in some sense, there is "only one" such group.)
$G$ contains elements of order $2$ and $3$. Because these orders are coprime and $G$ is abelian, the product of these elements has order $6$.