I've encountered a question describing a harmful (with a potential of lethal or health affecting results to people) activity. And I am wondering how possibly action can be taken to prevent it, in case the person continuing with this activity. The question I am talking about is here.
If such a question is on-topic, giving good advice and warning of the dangers (ideally supported by reliable sources on them) is the best we can do. We can't prevent people from doing anything stupid or dangerous, we can only warn them.
There are cases where we should ask ourselves if we're enabling those users to do something dangerous. In such cases, not answering might be the best option, but the exact line is something that needs to be drawn on each site.
Many cases where we could cause harm by answering are also simply declared off-topic. Biology for example doesn't allow medical advice questions.
Some sites like Chemistry have questions where actually performing the action this is about would be dangerous for anyone without sufficient experience. Answering people how to synthesize explosives with household equipment would likely be a bad idea. Discussing such syntheses in a professional setting is on-topic and probably harmless. That kind of information is out there anyway, we can't do much more than clearly outlining the dangers.