In a nutshell, yes, and here are some options
Do Apple computers running macOS have built-in protection against viruses and malware?
In today’s world, both Windows and Mac operating systems come with a built-in firewall. When it comes to security, the built-in firewall does half the job, while the firewall that comes with your favorite security suite does the rest. There’s not much reason to consider installing a standalone personal firewall anymore.
Of course, there are specific situations where you want to ensure the absolute minimum of security. This would mean that you might need an additional firewall layer. Contrary to what some on the internet claim, there are still plenty of firewall products available, both paid and free, for you to choose from.
To add to what has already been said, your WiFi router also has its own firewall that works in conjunction with both your device’s built-in operating system product and your chosen security suite. It uses Network Address Translation (NAT) to assign each device an IP address within a range that is only visible within a local network. Even then, this may not be enough for some.