Just like brick-and-mortar casinos, online operators must participate in states' self-exclusion programs. That means they can't even market themselves to, much less accept an account registration from, a person on any of those lists. That includes electronic forms of marketing like emails.
Also, apps and sites must prominently post information on how individuals with compulsive gambling issues can get help. Finally, part of the gambling taxes they pay goes to fund such programs so people with those issues can use the resources free of charge.