I cannot find an appropriate counterexample.
Is there a counterexample? Or is $A$ indeed Hermitian?
The matrix $$A = \begin{bmatrix}1&1\\0&-1\end{bmatrix}$$ is not Hermitian, but $$A^2 = \begin{bmatrix}1&1\\0&-1\end{bmatrix} \begin{bmatrix}1&1\\0&-1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} = I.$$
Copyright © 2021 JogjaFile Inc.
The matrix $$A = \begin{bmatrix}1&1\\0&-1\end{bmatrix}$$ is not Hermitian, but $$A^2 = \begin{bmatrix}1&1\\0&-1\end{bmatrix} \begin{bmatrix}1&1\\0&-1\end{bmatrix} = \begin{bmatrix}1&0\\0&1\end{bmatrix} = I.$$