Can I get some advice and no judgement please

I just came home from the hospital today and all of the sudden I go to give my daughter 6 some extra clothes and they give me this she can't come home or be around your boyfriend wtf I was in the ER trying not to have this baby too early and now your saying I can't have my other baby like she was healthy happy and stuff now I can't see my baby wtf they said take her to the doctor for a physical first off she's never alone with a guy except my dad I'm wondering if someone touched her there and called and lied on my bf? He's been so good to us my last man beat the shit out of me and they never did anything I'm so confused and I'm so hurt I don't knew what to do