The Internet’s increasing connectivity through devices and systems, particularly with the Internet of Things (IoT), has expanded the threat landscape, making cybersecurity a constantly evolving field. Phishing is a common and emerging cyber-attack that attempts to deceive individuals and persuade them to disclose sensitive information, such as passwords, financial information, or personal data. Researchers have studied phishing extensively in recent years to understand its mechanisms, strategies, and potential solutions. This research examines essential factors that affect how online users behave regarding security in cyberspace, focusing on phishing attacks through the Health Belief Model (HBM). Understanding what influences users' security behaviors is crucial for building strong defenses. A survey was sent to students via WhatsApp and email, with 252 participants. The results were analyzed using quantitative methods. Principal Component Analysis (PCA) revealed that perceived barriers, self-efficacy, and privacy concerns were the main determinants of students' security behaviors. Students were particularly concerned about the misuse of their personal information. Despite varying levels of formal cybersecurity education, most students demonstrated confidence in configuring web browser security settings. The findings underscore the importance of tailored educational interventions and user-friendly security tools. Future research could explore additional security issues such as spyware, adware, and spam attacks. Additionally, leveraging machine learning and deep learning algorithms offers promising avenues for enhancing phishing detection and mitigation strategies. Furthermore, this study contributes to understanding cybersecurity behaviors, providing valuable insights for policymakers, educators, and developers to foster a safer online environment.