I have no secrets in playing gambling, what I do is stop when I'm in a winning position and in my opinion it is the most effective and exploiting strategy when I'm lucky and stop to get the maximum profit.
because if I keep playing I will definitely lose everything.
I guess that's the only way to prevent losses which will lead you towards bankruptcy in the future. I would prefer to stop gambling as soon as I hit profit, in order to minimize risks as much as possible. Some say that you're much safer investing into a casino's bankroll than actually gambling on it. Of course, there are still some risks involved but they're easily manageable. You could easily double or triple your money within the gambling industry by investing into the bankroll, as well as, referring other people towards your online casino of choice.
There no secret to this other than luck. For skill-based games, that's another story. If you master games like Poker and Blackjack, you'll be able to win most of the times as they're purely based on your skills. If you want to play gambling games that are based on luck, then I'd suggest to use faucet earnings or "play money" in order to avoid losing your hard-earned money over the long term.
Nonetheless, while I'm a fan of gambling games, I often try to not spend more than what I can't afford to lose in order to prevent bankruptcy. Being addicted to gambling will only make matters worse. Which is why, the true secret of gambling may be to have patience and never invest more than you're willing to lose. Just my thoughts