I've done this a couple of times. I've taken 510 carts, 510 vape, dry herb vape, grinder from UK to Cyprus and the Canaries. Here's my 2c.
When you're going through security, they aren't looking for drugs. If the come across any obvious drugs in the course of their job, it seems reasonable that the may involve local law enforcement, but this in the UK is probably unlikely.
I put carts in with my bag of liquids and have any vapes and grinders (all cleaned carefully) in carry on.
510 carts are probably not going to leak, but it's probably worth making sure they're in sealed containers in case of leakage.
Going to Spain is probably low risk, ss Spanish law is relatively lenient compared to countries when it comes to cannabis. There seems to be little point in checking for recreational amounts going to Spain.
Coming back to the UK could be more problematic. But even there, it seems unlikely that you'll fall foul of the UK authorities. Who cares enough about a few grams of weed or a cart or two to mount random searches of passengers?
However, despite the low risk, if you are caught, there are problems that may haunt you for a while. You'll possibly have a criminal record that will probably flag you up on every subsequent visit. Which might be shared with other agencies. Not good. I mean, even though I don't want to go the USA at the moment, I wouldn't want a drug conviction showing when I'm at passport control at LAX 😳 in the future
TLDR: It depends on your personal risk / reward assessment for each journey. The chances of being caught are low. But the consequences could be dire.
