Bleeding while pregnant ?

Daisy

So I’m 4 months pregnant and I woke up with a whole lot of blood I really thought I had peed myself so when I went to the bathroom and peed I noticed it was all blood I got so scared so I rushed to the hospital and now I’m being checked they even saw the baby he/she was fine the heartbeat strong and they said my cervix was closed but they still want to do more tests on me I mean I’m still bleeding so I don’t understand why ? Has anybody ever gone through something like this and your baby still came out okay ? I’m scared to lose my baby, I was fighting with my brothers and they said some pretty fucked up shit almost ruined my relationship and I was crying too much stressing a little to hard so idk if I caused this