You can do this with DrWeb firewall, but the amount of alerts you will receive will be overwhelming.
Same can be done with Sphinx Software Windows 10\11 Firewall Control with the same overwhelming number of firewall alerts.
The difference between the above firewalls and others is that they filter ANY network stack traffic - whether it is Windows core processes, Universal Windows Apps, or third party apps. Some firewalls do not filter Windows core process or UWP network traffic.
Without creating permanent firewall allow rules, you will literally have to reply to hundreds, if not thousands, of firewall alerts per day.