How to permanently block all incoming connections in the macOS firewall?
You might want to install Little Snitch, a tool that helps you to identify and control any incoming and outgoing traffic and what it was initiated from.

Note that I assume it is not advisable to completely block any incoming traffic.