Sometimes, for some people, for some problems, CBT works, to a lesser or greater extent.
As others have said, if you don't put in the effort both inside and outside sessions and continue with that effort after therapy has finished, then it probably won't work for you.
And if you do put in the effort, there's still a good chance it won't work for you — if you're not ready for it, if you don't have the right kind of problem, if you struggle to access the education and tools and techniques, if your therapist isn't experienced enough, if your therapy doesn't last long enough, lots and lots of reasons it can be disappointing.
For those it does work for, it can be life-changing, or it can improve things enough to make life more manageable, and it's also possible to go back for top-up sessions if you find yourself slipping later — that's totally normal, and it's not like starting from scratch.
I found it worse than useless for my depression.
When I'm leaning towards more severe depression, I struggle to move or talk, I can't understand sentences much longer than half a dozen simple words or with complex concepts (and they take a long time to hear, process and understand), my thoughts take effort to pull individually out of the sludge (and all of them are grim and hopeless), and the kind of questioning and evaluating and critical thinking required is utterly impossible. I just feel terrible guilt and shame at wasting someone's time, despair at the hopelessness of it all, and overwhelming fatigue at having to go somewhere and produce words.
When less severely depressed, or agitatedly depressed, I find the attempts at challenging and reframing of thoughts to be a turbocharger for my depressive thinking, as I start arguing in circles with myself, digging deeper in and finding even better arguments against the reframings as to why I'm useless, pathetic, a burden, am morally obligated to kill myself, etc. etc.; that I'm pathetic for falling for cognitive biases and at the same time believing every terrible biased thing I think about myself, and I've told clinicians these false beliefs about myself and how others think about me and how I've hurt people, and how useless and depraved I am, in such a convincing way (because I believed them) that they've written them down as fact. Which has turned out to be unhelpful.
But! Same person, different problem and different time (and different therapists): I found the more behavioural side of CBT, in the shape of treatments for specific anxieties, particularly using graded exposure, really quite helpful. While there's nothing I can seemingly do to stop my mind fighting back against the more cognitive type of treatment I was given for depression, I can force myself through graded exposure and make my brain slowly realise that shop assistants and buses aren't going to eat me.
Although, funnily enough, the real breakthrough with public transport fear didn't come until I changed my medication. Weeks of work got me tiny improvements, but then I had a bad week, couldn't make myself do the solo bus-trip to the local town we'd planned I'd do, and the IAPT therapist fired me 🤣 A couple of years later on, having recently started the new meds, I thought "Why don't I visit my relative in London?", mentioned it to them, took a bus, a train and the underground, and didn't feel the slightest twinge of anxiety.
By which I mean to say: have you checked with your doctor that your medication is really optimal? There may be some options for anxiety you haven't yet explored — changing your meds or your dose, or maybe adding meds to target symptoms.
Unfortunately, a lot of the people providing CBT have not really had a particularly broad training; many of them are trained only in CBT and some listening skills to support that, and only for specific patient types and scenarios, and will often just go by the book, hardly much different to doing a CBT course on a computer. I hope you get a decent one.