I've already admitted several times that I don't understand the world anymore. I USED to understand the world. I don't understand the world now. First Georgia became a swing state? Now TEXAS???
Texas has more registered Democrats than Republicans, but they don't vote in the same numbers. Largely due to voter suppression policies (like 1 ballot drop box per county).
Texas is pretty dang purple. As others have mentioned, there is some serious voter suppression that goes on. Just take a look at that crazy law that targeted (basically, only) the county that Houston is in, allowing the state administration to throw out their votes.
Texas was majority Democrat into the 90s. It's an urban, diverse and reasonably prosperous state. If it wasn't for Bush becoming president, we'd probably have reached this point a decade ago.