TLDR: Layered security is better than having a single control. You should have a firewall and antivirus (Endpoint Protection)
A firewall and antivirus (most security folks will refer to the more technically correct term endpoint protection) are very different types of security controls.
A firewall is meant to filter network traffic based on different characteristics. Most firewalls will block and/or allow traffic by ip adresses and ranges, ports as well as based on network connection states. There are other advanced features depending on the firewall.
Endpoint protection software looks at code on the system for malicious indicators in code either pre disk write or after, and some can look at the code in-memory (better protection)...