Hello Haziq,
Hope you are doing good today.
Wazuh uses a list of default ports for the communication of Wazuh core components. Have a look at this Required ports - Wazuh guide to see the required posts list.
For Wazuh agent communication with Wazuh server, you might enable the following ports from your firewall:
You can follow Wazuh agent enrollment guide to know more.
Hope this helps.
Let me know if you require further clarification.
Regards,