Social media platforms and websites should have strict policies against this type of offensive content. They need to actively monitor and remove any such content as soon as it is detected. For example, many platforms use algorithms and human moderators to screen for inappropriate content.
Individuals can also take a stand. If we come across such offensive content, we should report it. Also, by having conversations with others about why this type of content is wrong, we can create a more positive and respectful social environment where such offensive things are not acceptable.
One way is through education. By teaching people about respect, values, and appropriate language from a young age, we can raise a generation that is less likely to create or spread such offensive content.