What if question

I’m not sure if this is in the right thread…I want to go to a UC but I didn’t pass a nontransfer math class that I have to retake again…

I have a 3.80 transfer gpa though and am an anthropology major but anyway my question is what if I can’t get into a UC and go to a Cal State but the issue is that I want a graduate degree/phd eventually…

Cal State’s only offer up to a Masters so let’s say I get the Masters but then what? I can never get a PHD because I went to a Cal State or I could transfer again to a UC to get it?

Just curious. I’m a sophmore in CC now but I’d like to know anyway.

Thanks!