You need to check course enrollment policies at your schools of interest if you want to take AI courses as a Cogsci major. At most places these courses are in demand and often reserved for people taking cs or data science.
For instance, at UCSC CogSci majors can only enroll in upper div cs courses in 2nd pass. At UCB, you can’t enroll in AI or ML upper divs. So do extensive research on what’s feasible at each school.