As a matter of U.S. Constitutional law, Texas does not have a right to secede and neither does any other U.S. state. See Texas v. White, 74 U.S. 700 (1868).
Instead, secession would require an abrogation of the entire U.S. Constitution and the governmental regime based upon it.
This makes secession less likely now than it was back in 1861 when the circumstances under which a state could leave the United States was not the subject of any binding legal interpretations of the U.S. Constitution.
And, disentangling federal government operations (and the federal debt) from individual states is much harder now in 2024 where the federal government is far bigger and plays a more pervasive role than it was in 1861, when the federal government didn't do nearly so much.
Also, the current situation, in which the President has the power to activate the Texas National Guard and bring it into federal service to put down an insurrection, leaves Texas without any meaningful military capacity to resist U.S. government military forces in furtherance of its efforts to secede. See 10 U.S.C. § 1211, et seq. Every member of every national guard unit has been carefully trained about how this works.
One could image a departure of some U.S. states from the United States by mutual agreement, if a wide bipartisan consensus were reached to do so, but this is not where U.S. politics stand today, and is not likely in the near future.
A serious effort to actually secede unilaterally would leave its proponents dead or in prison for life in short order.
Short of secession, states could also attempt the unconstitutional act of purporting to nullify federal laws that states don't like. The governor of Texas has appealed to rhetoric to that effect. But even an extremely conservative U.S. Supreme Court will not tolerate that legal doctrine. Prior attempts to recognize that by state supreme courts have been shot down with summary, unanimous, scathing orders from SCOTUS. See James v. City of Boise, 577 U.S. 306 (2016) (which rejected the Idaho Supreme Court’s, view that when the Supreme Court construes federal law, it “does not have authority to limit the discretion of state courts where such limitation is not contained in the statute.” In just one-and-a-half pages (more than one-tenth of which consisted of a single quote from the Court’s 1816 decision in Martin v. Hunter’s Lessee) the Court clarified that “[t]he Idaho Supreme Court, like any other state or federal court, is bound by this Court’s interpretation of federal law.”).
Something akin the U.S. federal government trying to enforce desegregation in the American South during the Civil Rights Movement (e.g, in Little Rock, Arkansas) in order to insure the supremacy of federal law, is more likely today than actual secession.