The COVID-19 pandemic has highlighted the need for effective predictive tools to anticipate outbreaks and optimize vaccine distribution. In this study, a hybrid long short-term memory (LSTM) and logistic regression model is used to predict COVID-19 outbreaks in Spain. Although a preliminary analysis using ARIMA did not show clear seasonal patterns, the hybrid model achieved an accuracy of 93%. While the initial data showed an unbalanced distribution, when balancing techniques were applied, the overall accuracy decreased to 87%. This reduction is offset by a significant improvement in the ability to correctly identify the absence of outbreaks, which is crucial for planning preventive interventions. It is worth noting that the implemented model allows for the visualization of a risk map by autonomous community, highlighting the areas with the highest probability of outbreaks, which highlights the importance of personalizing vaccination strategies according to regional dynamics. This study demonstrates the value of artificial intelligence in improving vaccination and prevention strategies, highlighting that with more robust data, including information on vaccination coverage for other infectious diseases and demographic and epidemiological variables, the model can be improved and provide key insights for addressing future pandemics.