Here are the Texas residency rules for Texas public medical schools:
https://www.tmdsas.com/PLAN/medical/before-you-apply/residency.html
Of course, staying in Texas for undergraduate will make it easier to get to interviews at Texas medical schools.