Weed started doing the same thing to me in my mid to late 20s. What used to be relaxing suddenly turned into anxiety and negative thought spirals.
A couple years ago (around 40) I started taking a low dose antidepressant for unrelated reasons and noticed that the weed induced anxiety mostly disappeared. My guess is that for some people there’s a serotonin/anxiety component that THC can amplify, but that’s just speculation on my part.
Not suggesting antidepressants as a solution by themselves. They come with their own tradeoffs and I wouldn’t take them just for that. But it has been a pleasant side effect I didn’t expect.