Many studies have investigated symptoms, comorbidities, demographic factors, and vaccine effectiveness in relation to long COVID (LC-19) across global populations. However, a number of these studies have shortcomings, such as inadequate LC-19 categorisation, lack of sex disaggregation, or a narrow focus on certain risk factors like symptoms or comorbidities alone. We address these gaps by investigating the demographic factors, comorbidities, and symptoms present during the acute phase of primary COVID-19 infection among patients with LC-19 and those who experienced reinfection, comparing them to typical COVID-19 patients. Additionally, we assess the impact of COVID-19 vaccination on these patients. Drawing on data from the Regional Health System of the Region of Murcia in southeastern Spain, our analysis includes comprehensive information from clinical and hospitalisation records, symptoms, and vaccination details of over 675126 patients across 10 hospitals.We calculated age and sex-adjusted odds ratios (AOR) to identify protective and risk factors for LC-19. Our findings reveal distinct symptomatology, comorbidity patterns, and demographic characteristics among patients with LC-19 versus those with typical COVID-19. Notably, factors such as age, female sex (AOR = 1.39, adjusted p <0.001), symptoms such as chest pain (AOR >1.55, adjusted p <0.001) or hyposmia (AOR >1.5, adjusted p <0.001) and being vaccinated (AOR = 0.10, adjusted p <0.001) significantly influence the risk of LC-19. Interestingly, symptoms and comorbidities show no significant differences when disaggregated by type of LC-19 patient. Vaccination before infection is the most important factor and notably decreases the likelihood of long COVID. Particularly, mRNA vaccines offer more protection against developing LC-19 than viral vector-based vaccines (AOR = 0.48). Additionally, we have developed a model to predict LC-19 that incorporates all studied risk factors, achieving a balanced accuracy of 73% and ROC-AUC of 0.80. This model is available as a free online LC-19 calculator, accessible at (LC-19 Calculator).