My toddler doesn’t want nothing to do with me

I’m pregnant and he literally hates me he doesn’t want my affection or for me to hold him or anything just his dad… I feel so down about it because I want to love him and I do try to show affection but he pushes me away or tries to slap me he’s literally up his dads butt. Any advice? My older(4) son doesn’t act this way just my 2yr old.