Any advice for dealing with a narcissistic ex?

I left my son and unborn child’s father about 6 months ago.

He was constantly belittling me, putting me down, and calling me horrible names. The worst thing was he would constantly blow up over the smallest thing and yell at me and our son. When I found out I was pregnant he was nasty to me and that is when I finally decided I refused to expose my babies to that anymore.

He has spent the entire 6 months going from begging me to come back, to flipping out and saying he’s gonna take me to court and take our son from me. (I don’t even want them to be alone he pushes him and yells at him, he’s only 18 months)

Today he flipped out because I said I’m not giving him another chance and then he started in on taking my son from me. When I start crying because I’m hormonal and that is my biggest fear. He goes back to “well let’s just be together and it won’t be a problem.” Then goes back to being nice.

I know he’s manipulating me and I still find myself falling for it because I’m so scared of my son ever being alone with him.

I just need advice, I’m overwhelmed and scared. Idk what to do.