I worked for the same California-based company in 2018, working remotely from home. I am a 1099 employee, so my employer does not withhold any taxes. I lived in California for six months, then moved to Arizona. Do I need to file state taxes in both California and Arizona for the money I earned in each state, or should it be based upon where the company is located in California?
California has a tax form (540NR) for "non-residents and part-year residents". Arizona appears to have something similar. You will file this form instead of the usual full-time resident's for for each state and it will include the calculations needed to apportion your income between the two states.
For CA the last time I did this (many years ago), they basically figured your tax rates based on your full-year income, then collected taxes only on the part of the year when you lived in CA. But be careful, CA is very aggressive about income tax and might, for example, want to know if you came back to CA even for a day or two after moving.