This study predicts traffic congestion in four US cities using various machine learning models. The research utilizes different regression-based models to predict congestion. Results from various models are presented, emphasizing their individual performances in terms of common evaluation metrics. XGBoost is applied with detrending and optimization to enhance predictive accuracy for MSE, MAE, and the coefficient of determination The proposed model demonstrates the lowest MAE (6.39), and achieves the lowest RMSE (10.99), showcasing the variability in model effectiveness. Additionally, we explore the sensitivity of selected features, shedding light on their impact on model results and contributing to a better understanding of our predictive approach. Coefficients of determination across all models indicate diverse predictive capabilities. Analysis is conducted on the performances of various models, providing a robust showcase of their individual strengths and weaknesses across commonly used evaluation metrics. The implicit problem background highlights the inadequacies in existing traffic flow prediction methodologies, prompting the introduction of innovative approaches. These findings are the first of their kind for traffic flow prediction in urban freeways of four US cities using this approach. The research holds significance for intelligent transportation management systems and urban planning. This research introduces an innovative prediction approach and showcases performance variations among different models. The practical applications extend to reducing travel times, addressing environmental concerns, and aiding decision-making for congestion alleviation and improved overall traffic flow. In conclusion, this research bridges critical gaps in traffic prediction methodologies, offering valuable insights and applications for urban planning and intelligent transportation systems.