How can the right to trade be balanced with the need to protect public health in the context of online gaming?

The government argued that online gaming platforms’ right to trade should not come at the cost of human lives. I want to analyze how governments can ensure economic freedom while safeguarding citizens from potential harms.