A mathematical representation that includes probability in describing a system’s development is called a stochastic process. A random variable or noise-containing function is generally employed to represent a stochastic term in a mathematical model. In this paper, we analyze optical soliton (OS) solutions for the well-known Stochastic Biswas–Milovic equation (SBME) with the parabolic law nonlinearity. The Sub-ODE approach is used for this purpose. A variety of new optical soliton solutions are generated, including hyperbolic function, periodic solitons, rational solitons, Jacobi elliptic function (JEF), Weierstrass Elliptic Function (WEF), positive solitons, bright solitons, kink type solitons and dark solitons. Localized solitons, such as bright (positive peaks) and dark (localized dips) solitons, are explained by hyperbolic functions. Localized algebraic waves are represented by rational solitons, even with periodic and doubly-periodic solitons are depicted by JEF and WEF, respectively. Kink solitons represent a variety of nonlinear phenomena by connecting different asymptotic states. Bose–Einstein condensation, fiber optic sensors, plasma physics, optical communication and other fields belong to applications for these solitons. Additionally, we will plot graphs to visually represent the system’s response. To plot some graphs for SBME, we will first import the necessary libraries into Jupyter as a machine learning tool, including matplotlib, scipy.integrate and numpy.