The schematic diagram of the entire study. A total of 776 samples were included from The MMRF CoMMpass database. Using univariate regression analysis and the Lasso algorithm applied to the KEGG p53 signaling pathway gene set, 15 significant p53-associated genes were identified. Additionally, the CIBERSORT algorithm was employed to analyze the TIC, uncovering six immune cell types with autonomous prognostic risk factors identified through univariate regression analysis. Subsequently, TIC and p53 scores were derived using the bootstrap-multicox method. Utilizing the composite score, we developed a p53-TIC classifier and validated the robustness and generalization capacity through external validation on the GSE136337 dataset (n = 215) and internal ten-fold cross-validation on the MMRF CoMMpass dataset. Furthermore, subgroup analysis explored prognosis, clinical characteristics, tumor mutation burden, and immune traits