4 year old polar opposite personality

My 4 year old son goes from one extreme to another. At daycare, appointments, speech therapy, anything to do with other people he doesn’t say a WORD. He barely even nods or shakes his head, he is so incredibly quiet and people he is not very familiar with always ask why he’s so quiet. Around me, or my husband or his close cousins he’s completely OPPOSITE. He throws tantrums, physically fights, even becomes aggressive with me. I don’t know how to handle these two extremes. Anyone else on the same boat? If so, what do you do?