Losing weight for a healthy pregnancy?

Hey guys! So I went through an early miscarriage recently. It was my first month trying and I got pregnant, and I was 5 weeks along, but then lost it.

Okay - so I want to try again. But i really want to make sure I’m doing everything right this time so i don’t lose the baby again. I’m not really considered overweight, but I could definitely lose a little bit of weight. Would eating healthier and getting my body into shape increase my chances of a healthy pregnancy?

What else would atleast help Increase the chances for a healthy baby?

Thanks to all.