It's very basic. It's the fundamental rule in gambling, although not really practiced by so many gamblers in real life. The money that you are going to bet, consider it gone before you even place the bet. So if you are betting with an amount that is supposed to be used for something else, then consider failing to buy that which you are supposed to buy. Lest we forget it, gambling is wasting money more than earning it. So, gamble only any excess.
There is something that I always proclaim, and that is that for gambling, sports betting, you have to bet the amount of money that one should be willing to lose, otherwise it is not good to put any assets at risk, if it is done that way Risk management is very likely to be a success and you will never have losses or failures as you commonly should.
However, when you do not have this control, it is very easy to fall into addiction and many times in the loss of quality of life, because the compulsive gambler bets everything he has in order to gamble and obtain that pleasure.