Pregnant and cramping

I found out I'm pregnant about 5 weeks but I'm having a lot of cramping that's very uncomfortable at times. I've made an appt to get it checked out but worried because 4 months ago I had a miscarriage.