The card must be yours
Casinos require deposits from an account in your own name, and withdrawals usually go back to the same card or account first.
Gambling transactions are coded
Card networks tag gambling payments with merchant category code 7995. That code is what bank “gambling block” features look for, and some banks treat these payments as cash-like.
Blocking gambling on your card
Most UK high-street and app banks offer a gambling block in their app, often with a cooling-off period before it can be turned off. It works across all merchants using the gambling code, licensed or not.