Some apps allow the author to set a content warning. Some hashtags may also lead to the warning. Unfortunately not all popular apps support it yet and the behaviour varies. There are also user reports for offensive content. But I am not sure if / how they are used by apps.