Back in January, on the cusp of Stadia's demise, Google released a final firmware update for Stadia controllers that enabled users to turn them into a standard Bluetooth device so they could continue to be used wirelessly. It was a considerate move for sure, but what may have gone largely unnoticed at the time is that the offer had an expiration date: Owners were given until December 31, 2023 to get the job done. And since today is December 1, 2023, this might be a good time to get around to doing it. Thanks for the reminder, Wario64.
To convert your controller, go to stadia.google.com/controller and punch that "Switch to Bluetooth mode" button. Because this is Google, the process will only work with Chrome—if you're using some other browser, you'll be greeted instead with a "download Chrome" option. Otherwise, the process will begin with a "terms of service" agreement and then simple on-screen instructions: Plug the controller into a USB port, verify it with Chrome, download and install the driver, and then enjoy your new wireless freedom.
Take note that this is a permanent switch, so once you've made the switch you can't go back, although I really don't know why you'd want to. Enabling Bluetooth support will disable the controller's Wi-Fi functionality, and the headphone and USB port will not work with headphones when Bluetooth is switched on, although the headphone jack will work if you're using it as a wired controller. The Assistant and Capture buttons will be non-functional after the conversion process because, y'know, Stadia doesn't exist anymore, but they are remappable so you can use them for other things.
Answers to any questions you may have are available in an FAQ on the Stadia controller site, and there's a bit more detail on Google's Bluetooth mode help center page. Unfortunately, if you run into real grief you're basically out of luck, as customer support is no longer available. The good news is that if the conversion process goes seriously haywire for some reason, or you just miss the deadline completely, the Stadia controller will continue to function as a standard wired controller, so at least it's not going to turn into a paperweight.