Pregnant with rainbow baby

So I got pregnant after taking a plan b and don’t under stand how this happend and I’m freaking out I’ve taken plan b before and it’s always worked last year I got pregnant by my bf (now ex ) and had a miscarriage at 3 months my guy best friend was there for me constantly and always gave me advice etc then we ended up sleeping together for about a year now he’s cumed in me a couple of times and I’ve taken plan b and it worked well this time it didn’t and I’m so scared And before anyone says anything he did it and didn’t say anything I didn’t know he was going to but yeah I’m pregnant and don’t know how to tell him he says he never wants kids and he knows how hard my last pregnancy/miscarriage was for me any advice on what I should say or just any opinions yes I could’ve been more responsible but it’s too late for that Please be nice I just need some advice or just thoughts I’m terrified of losing my best friend and ruining our friendship and just losing another baby I don’t know if I’m strong enough to do this again