Let $f:\mathbb{Z}_n\rightarrow \mathbb{Z}_n$ a group homomorphism. Prove $f\in\text{Aut}(\mathbb{Z}_n)\Longleftrightarrow f([1]_n)\in \mathcal{U}(\mathbb{Z}_n)$ $\mathcal{U}(\mathbb{Z})_n:=\{[a]_m\in\mathbb{Z}_m|\gcd(a,m)=1\}$
My proof
$\Rightarrow$
$\forall [x]\in \mathbb{Z}_n $ $$f([x])=f(x[1])=xf([1])$$
So can I say $f([1])$ is a generator and then $f([1])\in\mathcal{U}(\mathbb{Z}_n)$ ?
$\Leftarrow $
$f$ is injective: for $[x],[y]\in \mathbb{Z}_n$ such that $f([x])=f([y])$ $$f([x])=f([y])$$ $$f(x[1])=f(y[1])$$ $$xf([1])=yf([1])$$ $$x=y$$ $$[x]=[y]$$
$f$ is surjective: for $[y]\in \mathbb{Z}_n$ exists $[x]=[yf^{-1}(1)]$ such that $$f([x])=f([yf^{-1}(1)])=yf([f^{-1}(1)])=y$$
Is my proof correct?
In $\Leftarrow$ part, you cannot claim that $f^{-1}([1])$ exists, because you don't prove $f$ is surjection.
Since $\mathbb Z_n$ is finite set with cardinality $n$, so when you prove $f:\mathbb Z_n\to\mathbb Z_n$ is injective, then $f$ is automatically an automorphism (as a group, a ring ... any algebraic structure) by the Pigeonhole Principle.
So, adding some details of $\Rightarrow$ part, my amendment based on your proof is as follows.
Proof
$\Rightarrow$ part.
Since $f$ is group automorphism, so there exists $[x]\in\mathbb Z_n$ such that $f([x])=[1]$. Let $f([1])=[a]$.
Then $f([x])=f([x][1])=[x]f([1])=[x][a]=[xa]$, so $\gcd(a,n)=1$. so $f([1])\in\mathcal U(\mathbb Z_n)$.
$\Leftarrow$ part.
Since $f([1])\in\mathcal U(\mathbb Z_n)$, there exists $[a]\in\mathbb Z_n$ such that $[a]f([1])=[1]$. So if $f([x])=f([y])$, then $[x]f([1])=[y]f([1])$. $[x]=[y]$. $f$ is injection, so bijection also.