I would first talk to him about how his behavior makes you feel, that you feel like you’re being yelled at a lot and it makes you feel uncomfortable, like you can’t share everything with him. If he yells at you during this discussion or does not take you seriously or does not resolve to try to catch himself when he does it and stop doing it (don’t expect a blunt change because it’s probably habit, but habits can be broken over time), then I would seriously reevaluate whether you truly want to stay with this man or not. It’s no fun to be constantly yelled at, and I’m guessing you wouldn’t want to keep going through this for the rest of your life, so if the behavior is talked about and still continues regularly, then the relationship is likely going nowhere good, unfortunately.