Cloud computing is becoming popular in the tech industry as it offers convenient computing without the need to buy physical hardware. Instead, companies provide these services using their own computers and servers powered by electricity. However, running these data centers consumes a lot of energy, and with rising electricity prices, minimizing energy usage has become a big challenge. One way to tackle this is by efficiently managing data storage and scheduling tasks. In this article, we suggest using an advanced machine learning model called Extreme Gradient Boosting (XGBoost) to predict electricity prices and optimize data storage, helping to reduce energy costs in data centers