Terrible heartburn / maybe GERD ?

Al

So last night I got woke up out of my sleep coughing up acid and I could barely breathe . It was so awful I’m 21 weeks . Can an OB prescribe something for it or do you just have to buy something over the counter ?