How are people finding out so soon?

How are people finding out their baby’s gender so early by ultrasound? I thought the anatomy scan was only done 18-20 weeks?