They could also sue the local and state government to try to force them to enforce the laws on the books.
There’s several hundred years of legal history of state and federal governments being taken to court and made to stop or undo actions deemed to violate the law.
"The government" isn't a single unified entity. Texas has a long history of playing bullshit games saying "We can do this" and the feds saying "no you can't" and the courts have to solve it.
Texas insists that they have a legal right to secede. Any honest constitutional lawyer, and several founding fathers have addressed that point directly. There is no legal methodology within the context of the US system for any state anywhere to secede.
Usually "legal" means "following the laws", not "someone high up told me it was cool".