After a lot of trial and error, I’ve finally got it working.
The documentation makes this very confusing.
Even though InfluxDB Cloud Serverless uses InfluxDB 3.0, InfluxQL interfaces with it using the InfluxDB 1.0 HTTP API.
This means that, for anything using InfluxQL, the concepts of ‘databases’ and ‘retention policies’ still apply.
In order to connect to InfluxDB Cloud Serverless using InfluxQL, you need to associate a database and retention policy with a bucket.
One way to do that is using the instructions listed here.
InfluxData really need to work on their communication.