This study explores the growing reliance on e-learning platforms within Open and Distance Learning (ODL) institutions and the associated security challenges, particularly those related to social engineering. Social engineering, often referred to as human hacking, poses significant risks to the security and privacy of users by exploiting human factors rather than technical vulnerabilities. While traditional security measures like firewalls and encryption focus on technical defenses, they often fall short in mitigating these human-centered attacks. The research aims to address this gap by proposing a machine-learning approach to detect social engineering vulnerabilities in e-learning platforms. The study employs simulations to collect data, ensuring a comprehensive understanding of user behaviors and potential vulnerabilities. The data is processed, cleaned, and analyzed using various machine learning techniques, Random Forest, Decision Tree, and Recurrent Neural Network (RNN) are used to build the model. Evaluation of these models reveals that while the RNN model achieves the highest accuracy and precision, the Random Forest model offers the best balance across all metrics, making it a strong candidate for practical application. The findings underscore the importance of integrating targeted security measures to enhance the cybersecurity resilience of e-learning platforms. Through bridging theoretical insights with empirical testing, this study provides a practical solution to safeguarding e-learning systems from social engineering threats, emphasizing the need for ongoing awareness and proactive defense strategies.