In this talk,we will discuss two methods in proving Matom\"aki--Radziwi\l\l's theorem. The first method is based on the Vinogradov--Korobov zero-free region for $\zeta$-function. And the second method is based on the Hal\'asz's theorem. Motivated by these proof ideas, under the generalized Ramanujan conjecture, we obtain a small log-saving on the second integral moment of $L(1/2+it, \pi)$ where $\pi$ is an irreducible cuspidal automorphic representation of $GL_d(\mathbb{A})$ ($d\geq 3$). Specifically,the bound $$\int_{T}^{2T}\Big|L\big(\frac{1}{2}+it, \pi\big)\Big |^2 d t\ll_{\pi} \frac{T^{\frac{d}{2}}}{\log^{\eta}T}$$ holds for any positive constant $\eta\leq \frac{1}{400d^4}$. In addition, assuming the new zero-free region for $L$-functions, we can also obtain a small log-saving on the second moment of $L(1/2, \pi\times \chi)$ in $q$-aspect. This is a joint work in progress with Haozhe Gou.