Chemical pregnancy

Doc told me I had chemical pregnancy

Did I do something wrong? Is there a way to prevent that??? 🥺😭