You could transfer to UCD from any California Community College (CCC). If UCD has a TAG program for your major, then you can get the TAG from any CCC.
But it might be particularly convenient to go with Sacramento City College. Most SCC transfers target UCD over other UC campuses, so the counselors there are experts on UCD specifically. Furthermore, SCC actually has a satellite facility that offers classes in Davis, on the edge of the UCD campus. So you could move to Davis, enroll at SCC, and start taking classes in Davis right away, even if you were not enrolled at UCD. Don’t know if you can take all your SCC classes in Davis, but if not, the main SCC campus is less than 20 miles away.
https://www.scc.losrios.edu/daviscenter/
UCD, like other UCs, normally prioritizes CCC students in transfer admission. However, CCC students are typically California residents. I don’t know if they still give transfer priority to CCC students who are not state residents.