Second & third trimester moms! If your baby is measuring big how did they measure him/her?

Just curious how did the doctor measure your baby in third trimester? Was it by ultrasound? I see a lot of posts of women saying in their second and third trimester who say their baby is measuring a week ahead or 2 weeks ahead and I’m wondering if it was through ultrasound or Fundal height?