Food price volatility is a persistent issue affecting consumer purchasing power, market stability, and policy decisions. Our study investigates how XGBoost, optimized with Random Search, improves the accuracy of food price predictions. Key Insights: - Feature Selection is Crucial: Time-based features such as lagged prices and seasonal trends significantly improve model performance. - Hyperparameter Optimization Matters: Random Search tuning reduced the Mean Absolute Percentage Error (MAPE) to 0.0131, outperforming default settings. - Ensemble Models Are More Effective: XGBoost and Random Forest demonstrated better performance in capturing price fluctuations compared to ARIMA. - Computation vs. Accuracy Trade-off: While XGBoost provided the best accuracy, it required more computational time compared to CatBoost and Random Forest. These findings demonstrate how machine learning can enhance economic forecasting, helping policymakers and industry stakeholders develop better strategies for price stability.