Is it safe

This may be a stupid question but I actually do not know. I just found out I'm pregnant, is it still safe to have sex? I haven't seen a doctor yet. I'm so scared to misscarry.