The question itself is natural, but it's fairly elementary and has a clearcut answer in the literature on finite simple groups including the series of books by Gorenstein-Lyons-Solomon (and for small order groups the Atlas). It's easiest to understand what is going on from the algebraic group viewpoint, summarized with references in Section 1.1 of my 2006 LMS Lecture Note volume Modular Representations of Finite Groups of Lie Type. Here Lang's theorem is crucial. It shows that whenever you have an isogeny (algebraic group epimorphism
with finite kernel) from one connected algebraic group onto another over a finite field of $q$ elements, the corresponding groups of rational points over $\mathbb{F}_q$ have the same order.
In your case, start with the natural map from a general linear group to the quotient by scalars, which restricts to an isogeny $\mathrm{SL}_2 \rightarrow \mathrm{PGL}_2$. Thus the two finite groups do have the same order for any $q$, even though the original map fails to be an algebraic group isomorphism. When $q$ is even, however, the finite groups are in fact isomorphic. But when $q$ is odd, the group on the left has a nontrivial center and the group on the right doesn't.