Cyberbullying can have far-reaching and longlasting consequences, producing major emotional pain and potentially leading to serious mental health concerns such as despair and anxiety. Hence it is an escalating concern in the digital era, necessitating robust preventive strategies and early detection mechanisms. In our study, we conducted a comprehensive investigation into the potential of diverse machine learning (ML) algorithms for predicting cyberbullying behavior in social media posts. We systematically assessed six ML models: Support Vector Machines (SVM)(Accuracy 82%, F1 score 82), Multi-Layer Perceptron (MLP)( Accuracy 78%, F1 score 79), CatBoost(Accuracy 83%, F1 score 84), XGBoost(Accuracy 83%, F1 score 83), Logistic Regression (LR)( Accuracy 82.4%, F1 score 83), and naive Bayes (NB)( Accuracy 76.3%, F1 score 75). The accuracy rates above 80% are generally accepted to be good if are accompanied by decent or high precision and recall values. Rigorous evaluations revealed discernible distinctions in their predictive capabilities. CatBoost and XGBoost demonstrated exceptional accuracy rates of 83% and impressive F1-scores from 84% to 85%, positioning them as front-runners. LR yielded noteworthy results, boasting an 82.4% accuracy rate and an 83% F1-score, ensuring consistent performance in cyberbullying prediction. SVM, MLP, and NB, although slightly trailing, provided credible results, showcasing their adaptability for specific application requirements. Each algorithm presents unique attributes, permitting customization to suit a variety of use cases. These findings hold significant implications, marking a new era in online safety. Machine learning algorithms have the potential to enhance content moderation systems by proactively identifying and addressing cyberbullying, fostering a safer digital environment. However, the choice of algorithm should align with precise objectives and operational needs, with CatBoost and XGBoost suited for comprehensive content moderation and SVM, MLP, LR, and NB suitable for applications necessitating tailored precision or recall optimization. As a future direction for the research, predicting cyberbullying on underrepresented groups or specific groups like LGBTQ+ can also be explored.