Failed 1 hr glucose😢

Does anyone know if failing the test is based on eating habits or just how your body breaks down sugar? I really feel bad because I don’t want there to be any complications for me or the baby. My screening was 189, which I know is really high. Im not the healthiest eater but not the crappiest either