Bleeding and Pain- Help Please!

I have had random drops of red blood on three or four occasions since finding out I was pregnant. I am now 8 weeks and for the past week have been having sharp pain in my lower right side that comes and goes. yesterday I had more bleeding and the pain got worse so I went to the ER. baby had a HR of 146 and I measured 8 weeks 1 day. any ideas of what could cause this/ similar stories? I'm still very worried about miscarrying 😕