2nd trimester curiosity

i’m 17w6d, anatomy scan is in two weeks! anyways, i’m 19, unplanned pregnancy but hey it happens. i’ve had it pretty easy and no sickness. just constant migraines and all week this week i’ve had heartburn no matter what i eat. anyone have remedies for that?? also, is sex often harmful in anyway at this stage of the pregnancy?