Advice ladies?

So I'm posting on here because I'm just looking for some advice about what to do for now. I'm 20 weeks pregnant with my first child and I'm in a relationship of a year with the father, weve had bad points in the relationship but the pregnancy was unplanned and he says he's as happy as I am and we plan to get a house together and build a family, however every month or every so often he says he wants space and starts random arguements for no reason, mainly when he's drunk. He goes to the pub a lot when he's off work, but he could ignore me for days and really upset me with things he says. Other times our relationship is great and he's so loving. I'm confused and don't know what I'm doing wrong. It's happened again and he's ignoring me saying he wants peace. This is making me stressed and I'm finding myself in tears a lot with emotion because I don't know what I'm doing wrong.. is he unhappy because I'm starting to get the feeling he doesn't want to start a family and wants the easy life 😞 should I just ignore him and give him space when he wants it or keep trying to talk, when I do try and text or whatever I'm doing his head in. any advice would be appreciated xxx