Can I buy car insurance in the state i have previously lived?

I use to live in NY and I currently live in Texas. One of our cars is currently registered in NY; HOWEVER we purchased a second car and that is registered in TX.
Legally, where can I obtain car insurance?