For me, it's a question of probabilities and some luck (although I don't really believe in luck). Always remember that the house has the advantage when gambling at casinos.
When you win, you get a dopamine rush that makes you want more, and in that excitement you start to lose and try to recover your losses, making the situation worse and turning into frustration.
The machines are programmed to offer this, some wins to make you bet more and more (just my opinion).
Playing cards is different, as are other games that require strategy and knowledge of what you're doing.