Since a firewall can control the access of a computer to the network and is related to security, it can be optional. Also, it is a little complicated on Linux.
But follow the commands below to enable the firewall on Arch Linux.
To install it:
sudo pacman -S ufw
To enable the service:
sudo ufw enable
To check the status:
sudo ufw status verbose
And finally, to enable its auto start with the system:
sudo systemctl enable ufw.service