Early doctor appointment

Ti

I'm wondering what happens at the first prenatal visit. I see many people going to the doctor as soon as the pregnancy is detected but I'm confused about what they are hoping to see or find out. Is it to make sure it's not ectopic?