Heating pad and hot baths while pregnant

Do you guys think heating pads and hot baths are safe while pregnant?

I had a miscarriage earlier this month and had been taking hot baths and using the heating pad for my cramps and back pain but now I’m worried it caused issues and part of the miscarriage?