Breast cancer has emerged as a significant cause of female mortality globally, underscoring the critical need for early detection and diagnosis. Machine Learning, as a cutting-edge technology, holds immense promise in addressing healthcare challenges, including breast cancer detection. Despite advancements in technology, accurately discerning malignant breast masses from benign ones remains a complex and challenging task in medical research. Feature selection techniques play a vital role in this endeavor, as they aim to identify the most pertinent and informative features from complex datasets, thus improving the accuracy and reliability of models for detecting breast cancer. Numerous recent studies have emphasized the efficacy of metaheuristic algorithms in optimizing various problems across different domains, with particular focus on the Whale Optimization Algorithm (WOA). This paper focuses on evaluating the effectiveness of different feature selection (FS) approaches, such as WOA-based Feature selection, Recursive Feature Elimination, and SelectFromModel, in conjunction with diverse machine learning approaches for detecting breast cancer. The study assesses methods, including Support Vector Machine, XGBoost, Decision Tree, and Logistic regression using performance evaluation measures including, recall, F1-score, accuracy, area under the curve (AUC), precision, and feature removal percentage. Notably, FS based WOA combined with XGBoost model demonstrated outstanding performance measures, with an accuracy rate of 99.4%, an F1-score of 99.4%, 100.0% precision, 98.8% recall, and a 99.4% AUC. These findings contribute valuable insights into enhancing breast cancer detection accuracy and facilitating early intervention strategies, thereby potentially improving patient outcomes.