I have been admitted to CSUS for a computer science major however I was rejected from UC Davis. Is there any way I would be able to transfer to UC Davis after maybe 1 or 2 years?
UC Davis requires 60 semester/90 quarter units (Junior level standing) to transfer so figure on at least 2 years. CSU to UC transfers are possible but since there is no specific articulation for CSU courses to UC courses you will need to be diligent on figuring out which CSUS courses will be UC transferable. You might be better off going to your local Community college and TAGing to UCD.
UCD along with 5 other UC’s offer TAG (Transfer admission guarantee) where you take the required pre-req transfer courses, maintain a specific GPA and you are then guaranteed admission to that specific UC.
Here is some TAG information for UCD: https://www.ucdavis.edu/sites/default/files/home-site/admissions/documents/ucdavis-admissions-2019-tag-criteria.pdf