In this article, we apply the Fourier transform to prove the Hyers-Ulam and Hyers-Ulam-Rassias stability for the first- and second-order nonlinear differential equations with initial conditions. Additionally, we extend the results to investigate the Mittag-Leffler-Hyers-Ulam and Mittag-Leffler-Hyers-Ulam-Rassias stability of these differential equations using the proposed method.