We report measurements of the thermal Hall effect in single crystals of both pristine and isotopically substituted strontium titanate. We discovered a two orders of magnitude difference in the thermal Hall conductivity between $SrTi^{16}O_3$ and $^{18}O$-enriched $SrTi^{18}O_3$ samples. In most temperature ranges, the magnitude of thermal Hall conductivity ($kappa_{xy}$) in $SrTi^{18}O_3$ is proportional to the magnitude of the longitudinal thermal conductivity ($kappa_{xx}$), which suggests a phonon-mediated thermal Hall effect. However, they deviate in the temperature of their maxima, and the thermal Hall angle ratio ($|kappa_{xy}/kappa_{xx}|$) shows anomalously decreasing behavior below the ferroelectric Curie temperature $T_c$ ~$25 K$. This observation suggests a new underlying mechanism, as the conventional scenario cannot explain such differences within the slight change in phonon spectrum. Notably, the difference in magnitude of thermal Hall conductivity and rapidly decreasing thermal Hall angle ratio in $SrTi^{18}O_3$ is correlated with the strength of quantum critical fluctuations in this displacive ferroelectric. This relation points to a link between the quantum critical physics of strontium titanate and its thermal Hall effect, a possible clue to explain this example of an exotic phenomenon in non-magnetic insulating systems.