Does anyone understand ovulation? How does it work?

Im so confused I thought I was 8w5d baby's only measuring 6w5d w no fetal pole or whatever.. And I thought ovulation occurred between days 15-18 of your cycle which is your fertility window which would be accurate with the baby's measurements but before my u/a I was told I was supposed to be 8w5d.. And now they insensitively have told me I'm probally miscarrying to come back in a week. I don't understand any of this.