Here is the UCB math department recommendations for choosing one’s first upper level math courses:
Note the recommendation to have taken Math 55 (discrete math, including introducing to proof writing) before, and choosing Math 110 (proof focused linear algebra) before other upper level math like Math 104 (real analysis).