Dependencies or addictions work according to certain principles:
This is behavior that replaces some real needs and work on solving objectively existing problems;
This is behavior that is difficult to control and does direct harm to your life, be it loss of time, energy, health, reputation, opportunities, etc.
That is, absolutely anything from surfing the Internet to taking certain chemicals (nicotine, alcohol, etc.) can be addictive.
The specificity of chemical addictions is that they invade the dopamine cycle of the brain directly, and not indirectly, as it happens in other cases. Therefore, an important point in the strategy of combating chemical dependence is to protect yourself from the subject of addiction. Your brain truly believes that you need this substance to survive, like food or water, and will go to all kinds of tricks and arguments to get you to accept it. (There are some English-language materials that have helped my partner quit smoking, I can point them out if necessary.)
To combat other types of addictions, the most important thing is to understand which needs you are not meeting, and also what problems of yours are you trying to run away from? It sounds easy in words, but in practice, most likely, all the first options that will come to your mind will be tricks that your brain will throw at you to prevent you from facing the horror and pain of a real problem. The presence of a dependency is a reason to assume that for some reason you believe that this need cannot be satisfied, and this problem cannot be solved. This is the reason why psychologists or the support of people you can trust (or better, both) are needed in such matters.
Fighting addiction is a fight against oneself, and in order to win in it, you need to attract some external means.
The key word is balance.
If you lose something, you must find something to replace the loss (and this something must be equal).
If you lose addiction, you must replace it with something, otherwise it will return soon. This something should be interesting and take as long as possible. Ever dreamed of getting into coin collecting? Forward! Ever wanted to learn how to program? Take action! Ever admired the beauty of nature? Paint and brush in your hands - save the moment. If the brain is actively engaged in learning something new (and most importantly interesting), then it does not have time for addiction.
And remember, don't dwell on one thing. As soon as the brain gets used to your new activities, find new ways of loading. Whenever life enters a mechanical phase, addictions appear as a way to get rid of stress and fill time.