The function $f(z)=|\bar z|^2$, at $z=0$ The function $f(z)=|\bar z|^2=u+iv=x^2+y^2 \implies u=x^2+y^2, v=0$ would satisfy the Cauchy-Riemann conditions only at $x=0, y=0$. So $f(z)$ is differentiable at $z=0.$ Can we say that $f(z)$ is analytic at $z=0$ but non-analytic elsewhere? An explanation will help me.

The definition "analytic at a point" is that "there is neighborhood such that $f$ is complex differentiable at the neighborhood. So if you checked that $f$ is not complex differentiable at any points except 0, you must conclude that $f$ is not analytic at 0.
In fact, Cauchy-Riemann equation does not imply that this function is complex differentiable. $C^{1}$ condition is needed. $C^{1}$ condition defined as "all first order partial derivatives of real pary and imaginary part are continuous". To check complex differentiability at 0, you must go back to definition. $|\bar{z}|= z \bar{z}$ and $|\bar{0}|^{2}=0$, so you need to check that there is limit $\bar{z}$ as $z\rightarrow0$ and this has limit $0$. So your function is complex differentiable at 0.
