Daddy’s baby

Anyone else have a daddy’s baby? Feel like my son doesn’t even like me, always prefers dad. Not sure if it’s because I only breastfed for 3 months and then formula fed. Sometimes feel like he doesn’t even need me. He’s in the stage of hitting now and he will swat at me anytime he can, it’s hard to not let it get to me.