Feature engineering is essential for consumer behaviour prediction machine learning models. Analyzing customer behaviour reveals the complexity of feature development. A thorough literature review found that feature engineering has improved consumer purchase behaviour model prediction accuracy in several studies. We use six machine learning algorithms: Random Forest, Decision Trees, K-Nearest Neighbors, Naive Bayes, and Logistic Regression. This study examined Decision Tree, Gradient Boosting Classifier, K-Nearest Neighbors, Random Forest, Logistic Regression, and Gaussian Naive Bayes. The models were trained and evaluated using consumer purchase activity data on demographics, product preferences, online behaviour, and temporal factors. Every model achieved 80% accuracy, with Gradient Boosting Classifier, Random Forest, Decision Tree, and Logistic Regression performing best. Due to careful feature selection and preprocessing, the six machine learning models have similar accuracy and F1 scores. Proper feature engineering techniques affect consumer purchase behaviour, which this study investigates. This paper proposes feature engineering, which is novel. A correlation matrix is more efficient and effective than traditional feature selection methods for selecting relevant features. The accuracy depends on the machine learning method and characteristics used. However, the four models that performed well in our study—Decision Tree accuracy 86%, Gradient Boosting Classifier accuracy 86%, Random Forest accuracy 86%, and Logistic Regression accuracy 86%—are reliable and trustworthy for predicting customer purchasing habits.