Is the development of life linked to shared DNA development?

No.12376162 ViewReplyOriginalReport
If some bug or animal ate something, or acted in some way that killed it, how would it pass that "knowledge" to the rest of its species?
Wouldn't we have these things constantly killing themselves the same way?