Student-centered pedagogy (SCP) is highly considered for its potential to facilitate cognitive learning in Computational Thinking (CT) education. However, there is a noticeable gap in understanding its influence on students' cognitive development from a multilevel perspective. This study delves into cognitive learning theories and aims to bridge the existing gap by introducing a three-level conceptual model to illustrate how the influence of SCP on students' cognitive CT abilities is mediated through the cognitive learning processes. This multilevel approach simultaneously explores SCP within the intricate school environment where factors at the school, teacher, and student levels are closely intertwined. Data was collected from 82 programming teachers and their 2433 students across 43 Hong Kong primary schools. Using multilevel modeling, results indicate that the adoption of SCP is significantly anchored by school support on teacher professional development (TPD), which in turn enhances students’ cognitive learning (i.e., active, interactive, constructive, and reflective learning) in class, further contributing to their enhanced cognitive CT abilities. The findings underscore the nuances of SCP adoption in school scenarios, advocating for strategic approaches to maximize student achievements in CT education. Recommendations for future research are discussed. Copyright © 2024 Elsevier Ltd. All rights reserved.