1) Party ID. Yes, we always have to start with this. When in doubt, party ID wins. Look what it took for a Democrat to win in Alabama: the GOP had to nominate a damned child molester for Doug Jones to win. And even then, it was close. Texas is somewhat closer than Alabama because it is more diverse, but party ID is really hard to overcome.
2) The effects of personality are generally overestimated. Yes, Ted Cruz is a really horrible person, and everybody hates him. If that mattered so much, then how did he get into the Senate? Oh, right. He's a Republican, and it's Texas. See #1. As I often say when I teach my Congress class (or, really, plenty of my classes), a group of geese is called a "gaggle." A group of lions is called a "pride." A group of assholes is called a "Senate."
3) There is an old line that liberals fall in love, while conservatives fall in line. Actually, conservatives fall in love too. See: Trump, Donald. However, the left is frequently looking for some hero. Somehow, O'Rourke has become one of these people. Why? Doesn't matter. See #2.
4) At the end of the day, legislative elections are affected by a combination of local and national forces. Primarily, that means the partisan balance of the constituency, the relative experience levels of the candidates, and the partisan tides, to the degree that they exist, as they are determined by things like the state of the economy and presidential popularity. Those things are, of course, in tension, as I have written. We have a booming economy, but an unpopular president, which calls everything into question in terms of the potential for a partisan tide. Yet, that is really the only way Cruz gets the phony, underutilized cowboy boot from his state of preening fashionistas*, given the partisan balance of Texas. O'Rourke is a "quality" candidate, by the standards of the great guru of legislative elections, Gary Jacobson, because he is a member of the House of Representatives, but he's still a challenger running from the wrong party against an incumbent. He needs a partisan tide, and that's indeterminate right now.
Could Ted Cruz lose? Crazier things have happened. Way crazier things have happened. Alabama elected a Democrat because the GOP nominated a fuckin' child molester. And Donald Trump is President, along with everything that goes along with that. Generally, though, I go with political science, and political science says bet on Cruz.
And yes, if I had gone with political science in 2016, good ole' Alan Abramowitz's fancy, high-falutin' math (OK, it was simple OLS) would have told me to bet on "some Republican, whoever the fuck that is." I'd have been right.
*If you aren't herding cattle, but on some real fucking shoes, you overly-fashion-conscious posers!