Let $E(\mathbb{F}_p)$ is an elliptic curve, #$E(\mathbb{F}_p)=p+1-a$ and $x^2-ax+p=(x-\alpha)(x-\beta)$.
Now I found the following formula here https://joeylitalien.github.io/assets/elliptic-curves.pdf (Theorem 3.3)
# $ E(\mathbb{F}_{p^2})=p^2+a-(\alpha^2+\beta^2)$ but it doesn't work in problems.
What is wrong?