How to turn off Google Map tracker sharing location.?

As I have asked in the question. If any other man map location is shared by my phone forever, And how can I delete that sharing link?
https://support.google.com/maps/answer/7326816?co=GENIE.Platform=iOS&hl=en

[h=2]Stop sharing[/h]
  1. On your iPhone or iPad, open the Google Maps app
    9PC1B9JlEUuZ6zRep3sU6Qkcs3VTipAt4sKLgN3uA5G2bGrJb7bgvUq0m1C0fEAhD-ws=w18-h18
    .
  2. Tap the Menu
    f_H4uuRJ5BCr2ug_UJHfsU7lrdvZnZUsYqTwRnk6Lk8J0MjQzG68vm9kSB96RRJZwW8=w18-h18
    OZKshc18e-OhP0EdDBHIrgL77NgPwxicWtjigoSdTyDfprFyCMYaQOs4rVXiadH2Dg=w18-h18
    Location sharing.
  3. Turn off the switch next to the person with whom you want to stop sharing.
My girlfriend recently found out that her ex-boyfriend is tracking her phone through google maps sharing location and some other virus he installed. It was an absolute nightmare when she realized what was happening. I contacted some friends who are in that branch of modern technology. One of them explained to me that maybe resetting the phone to factory settings and creating a new account on the phone would be enough to solve the problem. My friend also warned me to MUST change her phone number because there is a Number Tracker Pro site that allows you to track devices using ONLY a person's phone number to successfully locate her phone.

Wow ! Apple needs to get in the way of this !

Original thread: https://forums.imore.com/threads/how-to-turn-off-google-map-tracker-sharing-location.417293/