Computational thinking involves the use of computer science principles to solve complex problems, extending beyond simple programming to various life applications. In today’s educational landscape, the promotion of these skills in the classroom is critical, yet students’ computational thinking skills remain underdeveloped due to inadequate learning models. Key indicators of computational thinking include problem decomposition, algorithmic thinking, pattern recognition, abstraction, and generalization. This study presents RBL-STEM learning activities aimed at enhancing students’ computational thinking through solving the Strong Rainbow Antimagic Coloring or SRAC problem and applying it to multi-step time series forecasting on river erosion using Graph Neural Networks or GNN. The research adopts a qualitative narrative method, beginning with the development of a prototype for multi-step time series forecasting on river erosion using SRAC and GNN, and progressing to the formulation of RBL-STEM learning steps. The results include a comprehensive RBL-STEM learning framework ready for implementation in future research. Learning framework offers student and educator a structured approach to integrating STEM on real life issues. By employing RBL-STEM, students are encouraging to solve river erosion problem systematically based on RBL stages. These finding suggest that the implementation of RBL-STEM with innovative mathematical problems such as SRAC can enhance students’ combinatorial skills, leading to practical solutions for everyday issues through education.