It depends on the major. Yes it might have some effect, though this will probably be be negligible, especially if you spend two years at a CC, in which case it will not play much of a role at all. I wouldn’t worry about it at all. I would say if it’s a prereq for a major course (I know you probably haven’t landed on a major for sure yet) then I would probably want to retake it.