The interfacial properties of the functional layers play essential roles in determining the power conversion efficiency (PCE) and the operational stability of perovskite solar cells (PSCs). Defects-associated non-radiative recombination losses at the perovskite buried interfaces have been recognized as the major factors limiting the device performance and reliability. Here, a strategy of cations engineering is developed to optimize the perovskite crystallization based on tin dioxide (SnO2) underlayer, which show high effectiveness in regulating the nucleation kinetics and suppressing the defects at the interfaces. Specifically, the additives of NaF in colloidal SnO2 enable to increase the perovskite crystallinity and mitigate the formation of pinholes in the perovskite films, all of which are favorable for enhancing the charge collection efficiency and device stability. Consequently, the PSCs with NaF yield a champion PCE of 23.19 % compared to that with LiF (21.87 %) and the control device (20.03 %). This cation strategy can be extended to the flexible PSCs, promoting the PCEs of over 21 % in NaF-based devices. Moreover, the introduction of NaF improves the device stability by retaining 83.07 % of the initial PCEs after 5184 h storage in the atmospheric conditions. This work proposes a facile way to engineer the perovskite buried interfaces and is applicable to further boost the optoelectronic devices.