Breast cancer (BC) is a serious issue and the biggest global cause of death for women. Therefore, it is crucial to find BC early in order to save their lives. Models for the prognosis of some diseases have been developed using machine learning (ML), which has been shown to play a crucial role in this process. In this study, we present a model that can distinguish between cancerous and healthy BC cells in order to classify people into those who have BC and those who do not. In order to optimize the characteristics and select the best subset from them, this study leverages the feature selection (FS) phenomenon. We examine six machine learning models: the decision tree (DT), random forest (RF), KNN, support vector machine (SVM), and logistic regression (LR). In order to assess the performance Of this paper’s classification models, we calculated precision, accuracy, recall, and F1-score to assess their performance. On the dataset, both before and after applying the FS approach, the six ML models’ performance was evaluated. The experimental outcomes demonstrate that LR and SVM are equally accurate and produce the greatest results when compared to other ML models, with a 98.246% accuracy that increases to 98.83% with Fs. A voting ensemble ML model was created based on LR, SVM, and other ML techniques to attain the greatest performance. Compared to other classic ML methods, ensemble models perform better.