Significant efforts have been made and are still being made on short-term traffic prediction methods, especially for highway traffic based on punctual measurements. The literature on predicting the spatial distribution of the traffic in urban intersections is, however, very limited. This paper presents a novel data-driven prediction algorithm based on random forests regression over spatiotemporal aggregated data of vehicle counts inside a grid. The proposed approach aims to estimate the future distribution of vehicle to everything (V2X) traffic demand, providing valuable input for dynamic management of radio resources in small cells. Radio access networks (RANs) working in the terahertz band and deployed in small cells are expected to meet the high-demanding data rate requirements of connected vehicles. However, terahertz frequency propagation has important limitations in outdoor scenarios, including distance propagation, high-absorption coefficients values, and low-reflection properties. More concretely, in settings such as complex road intersections, dynamic signal blockage, and shadowing effects may cause significant power losses and compromise the quality of service for some vehicles. The forthcoming network demand estimated from the regression algorithm is used to compute the losses expected due to other vehicles potentially located between the transmitter and the receiver. We conclude that our approach, which is designed from a grid-like perspective, outperforms other traffic prediction methods and the combined result of these predictions with a dynamic reflector orientation algorithm, as a use case application, allows reducing the ratio of vehicles that do not receive minimum signal power.