To enhance the efficiency of Tunnel Oxide Passivated contacts (TOPCon) solar cells, optimizing the electrode material components is essential. Glass frit, as one of the important components of silver-aluminum (Ag–Al) paste, plays a key role in the formation of good ohmic contacts, however, its specific impact on cell performance remains unclear. The effectiveness of glass frit is mainly reflected in its effect on the emitter surface. In this study, we aim to optimize the glass frit used for the frontal sub-grid of industrial n-TOPCon solar cells using inverse analysis based on known cell performance parameters. The overall morphology and internal structure at the Ag–Si interface of intact cells were analyzed by etching experiments. In combination with the composition of the glass frit, to probe the wettability difference between glass frit and c-Si, along with the reactions between the components of the Ag–Al paste after sintering, explaining the main reasons for the difference in the performance of the solar cell. It provides research ideas for characterizing the performance of the glass layer at the Ag–Si interface, which is conducive to the researchers in-depth understanding of the important role of glass frit in the metallization of solar cells, facilitating more targeted optimization of electrode pastes for solar cells.