Android Firewall+ (AFWall+) is an advanced iptables editor (GUI) for Android. It provides fine-grained control over which Android apps are allowed to access the network.
Install AFWall+ via F-Droid - https://f-droid.org/packages/dev.ukanth.ufirewall/.
Allow root Forever
.
Go to Preferences
and select/deselect all the options you prefer.
Here is an example:
See the following example/basic, which contains the above example and Allow selected
.
The icons left to right:
Every time you install a new app, AFWall will send you a notification to configure the new app.
Keep in mind with each new application you install whether it requires Internet access or not.
You can also add some custom scripts and more. Just check AFWalls wiki.