We can avoid such topics by having a strong sense of morality. When we see something that might be inappropriate, we simply don't participate in it. Also, promoting positive family - friendly topics can help create a better environment where such inappropriate things are not welcome.
One way is to educate ourselves and others about what is appropriate. We should also be careful about the sources of information we access. If a platform or a conversation seems to be heading towards such inappropriate topics, we should distance ourselves. For example, in social media, we can unfollow or block those who constantly post or promote such unethical content.
By being aware of ethical boundaries and choosing to engage only with positive media and conversations.