Machine learning identifies ferroptosis-related gene ANXA2 as potential diagnostic biomarkers for NAFLD. Here, ANXA2 is linked to metabolic dysfunction-associated steatotic liver disease.