Well, they can do things like change a law or, depending on the jurisdiction, simply show up and seize the hardware / arrest the operators.
But there's really little that can be done at a technical level to stop bitcoin mining from occurring. They can block traffic to mining pools, but VPNs hide that. They can investigate sites that are using significantly higher amounts of electricity than is typical, but they will find that type of enforcement to be very costly. Large commercial miners would be eliminated, but the individuals with a rig or two likely would never be found. Off-grid power (e.g, mini-hydroelectric, solar+batter, etc.) would also be never found.
China, for example, is estimated to still have about 20% of the global hashrate, even though mining was banned there over a year ago.
The improvements in Stratum V2 protocol can help miners with privacy as well: