This research work introduces a hybrid model, BIG-LSTM, designed to enhance the precision of computer numerical control (CNC) machines in the manufacturing industry powered by the Internet of Things (IoT). Traditional models primarily focus on nut temperature's impact on thermal errors, often overlooking factors like bearing and ambient temperatures, and tend to ignore the intercept in the temperature-error relationship. The presented model addresses these gaps by incorporating ambient and bearing temperatures, and considering both intercept and slope for predicting Z-axis thermal deformation. Integration of motor speed and coolant behaviour is also included, acknowledging the rise in temperature with increased speed. BIG-LSTM, combining LSTM, GRU, and Bi-LSTM models, demonstrates efficacy in experiments, achieving Root Mean Square Errors (RMSEs) within 0.9 mu m for spindle thermal displacement under varied temperature conditions. These findings highlight the model's potential in significantly improving accuracy and robustness in spindle thermal displacement predictions in the IoT era.