By the divisor bound |a_f(m)|\le\sigma_0(m)m^{(k-1)/2}, valid for every m\ge1 and each normalized newform — at the unramified primes p\nmid M, Deligne’s estimate and the Hecke recursion give |a_f(p^r)|\le(r+1)\,p^{r(k-1)/2}; at the ramified primes p\mid M we distinguish two cases. If p\,\|\,M (exactly divides the level), the local newform bound |a_f(p)|\le p^{(k-2)/2} with a_f(p^r)=a_f(p)^r (the local Euler factor at a prime exactly dividing the level, for a newform of trivial character; see e.g. [DiamondShurman, §5.8]) gives |a_f(p^r)|\le p^{r(k-2)/2}\le\sigma_0(p^r)\,p^{r(k-1)/2}; if p^2\mid M, then (trivial character) a_f(p)=0, so a_f(p^r)=0 and the bound holds a fortiori. Both cases occur here, as the newform levels M\mid 24 include M\in\{4,8,12,24\} with 2^2\mid M. The bound for general m follows by multiplicativity. The coefficient of q^n in f(ez) is a_f(n/e) if e\mid n and 0 otherwise, and for e\mid n, \sigma_0(n/e)\le\sigma_0(n) and (n/e)^{(k-1)/2}=n^{(k-1)/2}e^{-(k-1)/2}. Summing over the pairs (f,e) with e\mid n gives the claim.