To control the local network, you can set a white list and prohibit programs outside the white list from accessing the network.

As far as I know, there are three kinds of firewalls: A shield firewall, tinder security software and Fengyun firewall, which have networking control function and can be set to completely ban the network by default. Only the software on the white list can be connected to the network.

In addition, these three models are all free software. This "free" is the real free software (also called free software), not the kind of software that holds a trial version as a free version, nor the kind of software that is free but has advertising patches on the interface. The latter two practices are understandable, but I think it is not very kind to insist that it is free software with this version (the definition of free software is not like this).

Later: Actually, you don't have to pretend anything. Windows's built-in firewall can also do this by setting outbound rules, disabling all programs, and then setting a white list.