If the group is Abelian then by the Classification of Finitely generated abelian groups we know that $G=\mathbb{Z}_{2p}$ is the only possibility (if $p$ is an odd prime).
If it is non Abelian:
By Cauchy's theorem one gets that there exits an element of order $p$ and order $2$. Call them $x$ and $y$ respectively, then all possible elements of the group are as follows:
$$\{1,x,x^2,...,x^{p-1},y,yx,yx^2,...,yx^{p-1},xy,x^2y,...x^{p-1}y\}$$ since the order of the group is $2p$, we get that $yx=x^{j}y$ for some $2\leq j\leq p-1$. ($j=1$ will force the group to be Abelian, so it not possible).
Then $yx^2=(yx)x=x^j(yx)=(x^{2j\bmod{p}})y\implies yx^k=(x^{kj\bmod{p}}y)$ by induction.
Then $y(yx)=x=y(x^jy)=(yx^j)y=x^{j^2 \bmod{p}}yy=x^{j^2 \bmod{p}}\implies x^{j^2 -1\bmod p}=1\implies j=\pm1\bmod p$.
Since the group is not Abelian we get that $yx=x^{p-1}y$ is the only reasonable relation possible, now consider the homorphism induced by $y\mapsto s$ and $r=x\mapsto r $. This is clearly an isomorphism to $D_{p}$.
Therefore only groups of order $2p$ are $\mathbb{Z_{2p}}$ or $D_{p}$.