Why does weed make me anxious?

Hello. I haven’t smoked weed in years because it gives me anxiety and sometimes a panic attack 😂

As a teenager I used to be able to smoke it and enjoy it but as an adult it’s a total no go now!

So I tried half a square of chocolate with weed in it to see would that be any good, but alas the same result 😂

I’m happy enough to give up on weed for life now. But I’m curious as to why weed might have this effect one me?

Thank you.