Fasting blood sugar is a snapshot: it tells you the glucose level at one moment after an overnight fast.
HbA1c reflects average glucose over roughly the previous two to three months, so it smooths out day-to-day fluctuation.
Doctors often order both, because a normal fasting value can sit alongside a raised average, or the other way around.
Neither test replaces a clinical review. Diagnosis and any change in medication is a decision for your treating physician.