@Nidhi Priya Thanks for posting in our Q&A.
1.Please check the setting "Block All Cookies" and "Prevent Cross-Site Tracking" in Settings > Safari.
2.Maybe this setting locates in Settings > Apple ID > Find My > Share My location.
Hope it is what you want.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.