The mathematical modeling of infectious diseases plays a vital role in understanding and predicting disease transmission, as underscored by recent global outbreaks; to delve deep into the dynamic of infectious disease considering latent period presciently is inevitable as it bridges the gap between realistic nature and mathematical modeling. This study extended the classical Susceptible–Infected–Recovered (SIR) model by incorporating vaccination strategies during incubation. We introduced multiple time delays to an account incubation period to capture realistic disease dynamics better. The model is formulated as a system of delay differential equations that describe the transmission dynamics of diseases such as polio or COVID-19, or diseases for which vaccination exists. Critical aspects of the study include proving the positivity of the model’s solutions, calculating the basic reproduction number (R0) using next-generation matrix theory, and identifying disease-free and endemic equilibrium points. The local stability of these equilibria is then analyzed using the Routh–Hurwitz criterion. Due to the complexity introduced by the delay components, we examine the stability by studying the roots of a fourth-degree exponential polynomial. The effects of educational campaigns and vaccination efficacy are also investigated as control measures. Furthermore, an optimization problem is formulated, based on Pontryagin’s maximum principle, to minimize the number of infections and associated intervention costs. Numerical simulations of the delay differential equations are conducted, and a modified Runge–Kutta method with delays is used to solve the optimal control problem. Finally, we present a few simulation results to illustrate the analytical findings.