Every app you install with Play Store pops up and asks if you want to grant it networking. It's cool
I used to be able to on ArrowOS, LineageOS and I think on MIUI. Its been a few years since I gave up on custom roms though, so it may no longer be the case.
On Android it is typically done with a firewall app, like AFWall+