In chapter VII of Serre's 'A Course in Arithmetic', he defines the order of a meromorphic function $f$ (on the upper half plane $\mathbb{H}$) at $p \in \mathbb{H}$ to be the integer $n$ for which $\frac{f(z)}{(z-p)^n}$ is holomorphic and non-zero at $p$. He then says that if $f$ is a modular function, then $v_p(f)=v_{g(p)}(f)$ for all $p \in \mathbb{H}, g := \begin{bmatrix}a & b\\c & d\end{bmatrix} \in G = SL_2(\mathbb{Z})/\{ \pm 1\}$. This step is not immediately obvious to me: I did observe that since $(cz+d)^m$ is a holomorphic function of $z$ on $\mathbb{H}$ (for every $m \in \mathbb{Z}$), $\frac{f(z)}{(z-g(p))^n}$ is holomorphic on $\mathbb{H}$ if and only if so is $$\frac{f(g(z))}{(z-g(p))^n} = (cz+d)^{2k}\frac{f(z)}{(z-g(p))^n}$$ and by the same reasoning $\frac{f(z)}{(z-p)^n}$ is holomorphic on $\mathbb{H}$ if and only if so is $$\frac{f(g(z))}{(g(z)-g(p))^n} = (cz+d)^{2k+n}(cp+d)^n\frac{f(z)}{(z-p)^n}$$ However I do not see how to proceed from here, or even if this reasoning works.
This question has also been asked before (in here: The order of a modular form is invariant under the action of $SL_2(\mathbb Z)$) but the accepted answer there says that $v_{g(p)}(f(z))$ actually means $v_p(f(gz))$ and while in that case, the equality of the orders is clear, but I had an unanswered confusion there with regard to that interpretation (which I am mentioning here as well): I think that with $q:=g(p)$, the very definition of $v_q(f)$ (which is equal to $v_{g(p)}(f)$) as given by Serre in the first line of section 3.1 should mean the integer $n$ for which $\frac{f(z)}{(z−q)^n}=\frac{f(z)}{(z−g(p))^n}$ is holomorphic and non-zero at $q$. Moreover if $v_{g(p)}(f(z))$ actually meant $v_p(f(gz))$, then the statement "$v_p(f)$ depends only on the image of $p$ in $\mathbb{H}/G$" (given in the same part of the text) would be false (as the order of $f$ at $g(p)$ would be different from $v_p(fg)$ in general. Furthermore, in that case the valence relation would also have to contain all the orders of $f$ at every $g(p)$ (for every $g \in G$ for every $p \in \mathbb{H}$) and the relations (19) and (20) (in the chapter) would not make sense (as $v_p(f)$ would then depend on the representative $p$ chosen from each orbit in $\mathbb{H}/G$).
I would be really obliged if someone could resolve my doubts above. Thanks in advance.