This study deals with Ulam stability of second-order linear differential equations of the form $e(x)y''+f(x)y'+g(x)y=0$. The method established by C\u{a}dariu, Popa and Ra\c{s}a in 2020 is extended. The main results explain that the existence of a solution of a Riccati equation guarantees Ulam stability. In addition, this study establishes sufficient conditions for the Ulam stability of Euler-type differential equations that cannot use the results of C\u{a}dariu et al. Furthermore, examples of applications to differential equations with three variable coefficients, including Euler differential equations, are also presented.