Explanation for difference between groups of finite set under $+, \times$ operation. Explanation for difference between groups of finite set under operations:$+,\times$ for prime value of $n$.
All values in the set $\{1,\dots, n-1\}$ are generators of $\lbrace \mathbb{Z}_n, + \rbrace$ for prime $n$.
The order of elements are:

*

*Order $=7, 1+1+1+1+1+1+1\equiv 0\pmod 7$

*Order $=7,2\times 7 = 14\equiv 0\pmod 7$

*Order $=7,3\times 7 = 21 \equiv 0\pmod 7$

*Order $=7,4\times 7 = 28 \equiv 0\pmod 7$

*Order $=7,5\times 7 = 35 \equiv 0\pmod 7$

*Order $=7,6\times 7 = 42 \equiv 0\pmod 7$
The set of elements generated by each element are:

*

*$\{1,2,3,4,5,6,0\}$, 

*$\{2,4,6,1,3,5,0\}$,

*$\{3,6,2,5,1,4,0\}$,

*$\{4,1,5,2,6,3,0\}$,

*$\{5,3,1,6,4,2,0\}$,

*$\{6,5,4,3,2,1,0\}$,
So, is there only one subgroup = the group $\lbrace \mathbb{Z}_n, + \rbrace$?
But, the ordering of elements corresponding to each are unique, though as a set it doesn't matter.
But, when change the operation to multiplication, then same sized subgroup is not there, for all elements. Though, the multiplicative group has to exclude element $0$, as closure property then is not satisfied.
For the generators of $\lbrace \mathbb{Z}_7, \times \rbrace$ the set of values for elements in the set: $\{1,2,\dots,n-1\}$ are:
$1> \{1\}$
$2> \{2,4,1\}$
$3> \{3,2,6,4,5,1\}$
$4> \{4,2,1\}$
$5> \{5,4,6, 2,3,1\}$
$6> \{6,1\}$
The subgroups of $\lbrace \mathbb{Z}_7 \rbrace^{\times}$ are : $\{1\}, 
\{1,6\},\{1,2,4\},\{1,2,3,4,5,6\}$.
Also, why it is not necessary in case of latter that for prime $n$, all elements in the set $\{1,2,\dots,n-1\}$ are generators?
Say, above only elements $3,5$ are generators.
Similarly, for $\lbrace \mathbb{Z}_{23} \rbrace^{\times}$, the elements $2,3$ are not generators as $|2|=|3|=11, |6|=5$, while $|7|=|5|=23$.
 A: Here $(\mathbb{Z}_{p}, +) $ is finite cyclic group of order $p$.
Also $0\neq a\in \mathbb{Z}_p$ implies $|a|=p$ (Lagrange's theorem and uniqueness of element of order $1$ in a group).
Hence every non identity elements of $\mathbb{Z}_p$ are generators.
In case of $U_{p}=\mathbb{Z}_{p}^{\star}=\{1,2,3,\ldots ,p-1\}.$
We have that $(U_p, \times)$ is a group of order $\varphi(p)=p-1$
See the difference, any non-identity element of $U_p$ may not have order $p-1$.
To avoid triviality assume $p>3$ and $\varphi(n)$ is even forall $p>3$. Hence $2\mid\text{ord}(U_p) $. Then by Cauchy's theorem, $U_p$ has an element of order $2$ which can't generate the group $U_p (p>3)$.
Again since $U_p$ is a finite abelian group, for all divisor of $\varphi(p) $, there exists an element of that order. Hence for all elements whose order divide $\varphi(p) $ and less than $\varphi(p) $ doesn't generate $U_p$ (such element exists for $p>3$ as $\varphi(p)$ is composite).
In your example $|U_{23}|=\varphi(23)=22$.
Then elements of order $2$, $11$ are not generators.
