Some custom phone OSs (definitely GrapheneOS that mostly only works on pixels) will have the option for it.
Another way is to use something like Tracker Control (installed through F-droid not the info-only one on Google Play) and that let’s you disable internet access for a specific app.