Open the Privacy menu and choose the Location Services sub-menu.
Enable the Location Services toggle.
Scroll down on the Location Services page, and select the Safari app from the list.
Choose the appropriate desired option from – Never, Ask Next Time, or While Using the App.
The While Using the App option will notify you every time an app is actively using your location. As a result, you will always be able to keep a tab on the apps that are tracking you down, and you could then decide on the next course of action accordingly.