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.

Yes, $(0,0)$ is a solution of the Cauchy-Riemann equations, but it doesn't follow from that that $f$ is differentiable at $0$. However it does follow from that and from the fact that the partial derivatives of $u$ and $v$ are continuous functions.
But it doesn't follow that $f$ is analytic at $0$. If it was, then, near $0$, you would be able to expresse $f(z)$ as the sum of a power series $\sum_{n=0}^\infty a_nz^n$ centered at $0$. And that's not the case.
