An extensive number of people might be affected by heart disease (HD), a major health issue that can occur anywhere in the world. Therefore, early diagnosis of cardiac disease is advantageous for treatment. A technology that can easily diagnose heart disease must be developed because the number of people with the condition is rising quickly. In addition, the patient's smoking history affects whether a problem is present or not. The HD system can define the most crucial cardiovascular patient characteristics and identify high-risk patients, but it can also model these characteristics to make it simple and clear to distinguish between them. Age, chest discomfort, blood pressure (BP), gender, cholesterol, and heartbeat are a few examples of factors that are taken into account while applying and comparing machine learning algorithms. The major goal of this article is to create a fundamental machine learning model to enhance accurate cardiac disease diagnosis. In our study, we used a HD dataset to construct a machine-learning-based diagnosis method for heart disease prediction (Logistic Regression, K-Nearest Neighbor (K-NN), Decision Tree, Naive Bayes, Random Forest, and Support Vector Machine (SVM)). To evaluate the performance of classifiers, we employed cross-validation, feature selection techniques, and well-known machine learning metrics like classification accuracy, specificity, and sensitivity. The suggested system makes it simple to distinguish between those who have cardiac disease and those who are healthy. Additionally, each classifier's receiver optimistic curves and area under the curves were calculated. All of the classifiers, feature selection algorithms, preprocessing techniques, validation techniques, and metrics for measuring the performance of the classifiers utilized in this study have been covered. A smaller collection of features and the complete set of features have both been used to validate the performance of the suggested system.