Ultrasound measurement question

Could someone please explain how they measure when you have an ultrasound. I know they base your weeks off of your last period so going to the dr I would technically be “8 weeks” because my last period started 8 weeks ago. However when the ultrasound was done they said I was measuring behind at 7 weeks 2 days. Even though my period was 8 weeks ago I ovulated on cycle day 17 (used OPKs) so how do they go by 7 weeks 2 days when I wouldn’t have even ovulated yet for an egg to be fertilized?

I’m just really confused by this lol if someone has any insight that would be awesome!