if you gamble online I don't think it will affect the environment wherever you are, but it will have an effect if you invite and teach people in your environment who have not previously gambled
if we can control ourselves, maybe we will not invite other people or close friends to play gambling. But a gambler will generally tell his winnings to his closest friends so that he is unconsciously able to influence other people to gamble. so environmental factors are the main reason someone is addicted to gambling because they will be curious about the wins that their friends get so they will try to play in the context of being curious.
so basically the environment will determine a person's fate on their nature if their environment is mostly gamblers maybe sooner or later someone will be affected by the name of gambling, but if the environment does not have gamblers I don't think it is possible that someone will fall into gambling.