What are the precautions to avoid being attacked by hornet?

In the summer and autumn in the suburbs, I often hear about the incidents of hornet swarms attacking people. A question related to: “What are the precautions to avoid being attacked by hornet swarms?”