How much does coursework matter?

How important is it that you take courses directly in your major? I’m applying as a sophomore public health applicant and I’m currently slated to take 2 courses in my major by the end of freshman year. The rest of my schedule are geneds and a multivariable class. I was thinking of swapping one public health course for linear algebra, but I’m not sure if that would look weird to AOs. thoughts? Thanks.