I needed to do this for the State Farm Drive Safe & Save app - for me the URL was
prefs:root=Privacy&path=LOCATION/com.statefarm.DriveSafeAndSave
Open Shortcuts App / + / Add Action / Web / URL / input prefs:root=Privacy&path=LOCATION/com.statefarm.DriveSafeAndSave
/ Add Action / Open URLs
For other apps, the URL follows the format:
prefs:root=Privacy&path=LOCATION/bundle.id.here
Please, note, it is better to add two actions - one with the URL value and the other to open it, as seen on the screenshot:

as with the single one filled with the URL value directly, the shortcut redirected me to Safari, looking for the bundle id on the web.
And you can find the bundle ID of your specific app like this:
- Google the App name with a Desktop browser and open the apps.apple.com store link - in my case this was
https://apps.apple.com/us/app/drive-safe-save/id1043246998
- Extract the number after 'id' in the URL - 1043246998 in this case
- Create a new link a new link by adding your id number and country to this:
https://itunes.apple.com/lookup?id=??&country=??
example:
https://itunes.apple.com/lookup?id=1043246998&country=us
- open a new browser tab and go to your created link - this will prompt you to download a text file (probably named 1.txt) - do so and open it in a text editor such as Notepad or TextEdit
- Search for the bundleId entry - here's an example for the bundle ID for the Yahoo News App, which is com.yahoo.frontpage

Instructions for finding the bundle ID are from this site, which also describes another method if you happen to have the app's .ipa file.
How to Find Bundle ID of an iOS app ? Step by Step
Here's where I found the URL - It has useful URLs for other settings, too: An updated list of Settings URLs