This is an exercise from Tapp's book. I have my solution, but I am not sure.
Let $U: X\rightarrow X$ be a linear transformation on a finite-dimensional inner product space.
True or False: Any Unitary matrix corresponds to a unit circle on an orthonormal basis.
Your proof is wrong. You cannot jump from$$(\forall k\in\{1,2,\ldots,n\}):\langle U^*Ue_k,e_k\rangle=\langle\operatorname{Id}_ne_k,e_k\rangle\tag1$$to $U^*U=\operatorname{Id}_n$. For instance, if $f\colon\mathbb{C}^2\longrightarrow\mathbb{C}^2$ is defined by $f(x,y)=(x+y,0)$, then $(1)$ also holds, but $f\neq\operatorname{Id}_2$.
This example also shows that the statement is false.