Hi Le Sok,
Hope you are doing well. Thank you for using Wazuh.
Unfortunately you have to install Yara in every agent's endpoint manually.
If you want to push it to all the agents in one go, and for that you need to create some custom script or use ansible/puppet or some outside tool to achieve this.
Check this document for details:
https://documentation.wazuh.com/current/proof-of-concept-guide/detect-malware-yara-integration.html
I hope this information helps.
Regards
Md. Nazmur Sakib