These results revealed that MTHFD2 is a better indicator of prognosis in cancer patients than TYMS. Here, MTHFD2 is linked to cancer.