This study evaluated the impact of enteral nutrition versus parenteral nutrition on perioperative cognitive function and related outcomes in patients undergoing different surgeries. From April to December 2023, 240 patients in Shanghai, China, undergoing elective surgery were randomly assigned to receive either enteral or parenteral nutrition postoperatively. This cross-sectional study represented a wide range of clinical applications and surgical procedures. Outcomes, including longterm hospital stays, complication rates, dietary compliance, 30-day readmission rates, patient satisfaction, inflammatory markers, immunological response, stress response, and perioperative cognitive function, measured by Mini-Mental State Examination and Montreal Cognitive Assessment scores, were investigated in this study. Compared to patients in the parenteral nutrition group, those in the enteral nutrition group exhibited considerably shorter hospital stays (8.7 ± 1.9 days versus 9.4 ± 2.0 days, P < 0.05), lower complication rates (22% versus 30%, P < 0.05), and lower 30-day readmission rates (10% versus 15%, P < 0.05). The enteral nutrition group exhibited higher patient satisfaction rates (9.1 ± 2.1 versus 8.2 ± 1.6, P < 0.05). Additionally, enteral nutrition was linked to better immunological and inflammatory profiles and lower stress marker levels (cortisol, lymphocyte count, and C-reactive protein). After various surgical procedures, enteral nutrition recipients achieved higher scores on postoperative cognitive tests. Compared to parenteral nutrition, enteral nutrition provides better results regarding hospital stay, complication rate, readmission rate, patient satisfaction, and cognitive function. These results support the preferential use of enteral nutrition in postoperative treatment and contribute to the growing evidence demonstrating the physiological advantages of enteral nutrition and its beneficial effects on postoperative recovery and cognitive preservation.