The best way to achieve control and responsibility is to set a part a bankroll for every session that you play as I am assuming gambling addiction happens mostly to people who play instant result games like slot machines and alike and stay responsible when this bankroll ends they call it a day and quit.
Indiscipline in gambling can lead to a loss of control and wipe out your bankroll, regardless of the game you're playing. While we all want bigger wins with our small bankroll, the chances of that happening are slim. If we try to be realistic, we know that we will likely lose, and that's where the problem starts if we can't accept the outcome.
The problem is that this cannot be achieved instantly,I have been addicted myself in 2020 and since then I have started applying this methodology little by little until I made it possible,in the beginning weeks no matter how hard I tried I still could not stop,but then with the passing of time I started sometimes stopping and sometimes not until I was able to stop completely when I wanted.
I'm glad to hear that you were able to solve your addiction problem. As for me, I can't say that I've been addicted to gambling, but sometimes I also lose control. However, as we become more mature, we learn how to control our emotions because we understand that it's just part of the game.