This study utilized data from 140,294 prostate cancer cases from the Surveillance, Epidemiology, and End Results (SEER) database. Here, 10 different machine learning algorithms were applied to develop treatment options for predicting patients with prostate cancer, differentiating between surgical and non-surgical treatments. The performances of the algorithms were measured using the area under the receiver operating characteristic curve (AUC), accuracy, sensitivity, specificity, positive predictive value, negative predictive value. The Shapley Additive Explanations (SHAP) method was employed to investigate the key factors influencing the prediction process. Survival analysis methods were used to compare the survival rates of different treatment options. The CatBoost model yielded the best results (AUC = 0.939, sensitivity = 0.877, accuracy = 0.877). SHAP interpreters revealed that the T stage, cancer stage, age, cores positive percentage, prostate-specific antigen, and Gleason score were the most critical factors in predicting treatment options. The study found that surgery significantly improved survival rates, with patients undergoing surgery experiencing a 20.36% increase in 10-year survival rates compared with those receiving non-surgical treatments. Among surgical options, radical prostatectomy had the highest 10-year survival rate at 89.2%. This study successfully developed a predictive model to guide treatment decisions for prostate cancer. Moreover, the model enhanced the transparency of the decision-making process, providing clinicians with a reference for formulating personalized treatment plans.