By following moral and ethical guidelines. Writers should be aware of what is appropriate and not cross those boundaries. Publishers also have a role to play in screening out such inappropriate content.
First, individuals need to have a sense of self - restraint and good taste. If you're a writer, think about the impact your work will have on the readers, especially young ones. For society as a whole, we can encourage a culture that values positive values. For example, by awarding and promoting good literature that has positive themes. By creating an environment that frowns upon vulgarity, we can avoid the creation and promotion of stories like this.
Educating people about proper content creation is crucial. In schools, for example, students can be taught about the difference between appropriate and inappropriate topics. Also, the media can promote positive and healthy story themes, so that there is less interest in creating or promoting something like this. For instance, if more positive youth - related stories are in the spotlight, the demand for such vulgar content will decrease.