Trying after a miscarriage

So me and my so werent really trying but we weren’t preventing either. I found out i was pregnant and we were super excited. Unfortunately i ended up losing the baby pretty early on. We want to try again but im scared ill end up losing the next one too. What are some tips to get pregnant and avoid miscarrying again?