In the current study, our findings suggested that high serum vitamin D level, VDR rs2228570-A and rs11168287-A were associated with a decreased risk of NAFLD, and the combination of VDR rs2228570 and exercise time was more effective in the risk assessment of NAFLD. The gene discussed is VDR; the disease is metabolic dysfunction-associated steatotic liver disease.