This thesis focuses on design, development and simulation the optimal control strategy for the use of a vaccine in the treatment of the COVID-19 pandemic. The goal is to find the most efficient distribution of vaccines to maximize the effect in controlling the spread of infection, under medical constraints. Through mathematical modeling of the epidemic, numerical methods, optimization techniques and simulations, the paper aims to provide guidelines for making vaccination decisions. Using the differential evolution algorithm, the parameters of the SIR model of the epidemic were estimated and the optimal control problem was solved by Pontryagin's theory.