switching from breast to formula

I had to give baby formula one night and after she ate she screamed bloody murder until I could calm her down. idk if it made her tummy hurt but I thought it’ll be gentle on her since my first had tummy issues had to use similac aliminutum (sorry for bad spelling) now i’m scared to switch her to formula