Pain in top of stomach am that radiates to my upper back?

Is there anything I can take for this pain? I’m 27 weeks pregnant I know it has nothing to do with the baby because this pain is just on the top of my stomach that goes around my upper back 😣 it’s very uncomfortable and I feel bloated as well what can I take for this? Or should I go to the ER?