Bleeding after sex

Hua

I have some bleeding after sex. I learned that might come from the cervix. Don’t know if I should stop having sex? Does it harmful to baby? I am in week 17+5 now. And the bleeding after sex started from the 2nd trimester.