Filing California Taxes as part-year resident

Hello,

I moved from California to Maryland in 2022.

I have W2 income from working in California.

I also have 1099 income that I earned while being a Maryland resident but working in California (after I moved to maryland).

I don't know how to enter this 1099 income in Turbotax so that I am not double taxed. 

My understanding is that I have to report the 1099 income to both maryland and california, but that I will then get a tax credit from Maryland for taxes paid to California.

Any help is appreciated!