A telephone number can sometimes contain geographic numbering information, especially for traditional fixed lines. That does not mean a mobile number can reliably reveal the city where the phone is currently located.
For decades, fixed telephone networks used area codes associated with geographic regions. If you recognized the area code, you could often make a reasonable guess about the city or region originally served by that number. That history makes it natural to assume every telephone number still contains a physical location.
Mobile networks break that assumption. A mobile number is attached to a subscriber relationship, not to a telephone bolted to a particular building.
A mobile handset can use its number while commuting across a country, travelling abroad or roaming on another network. The digits stay constant even when the physical position changes minute by minute.
That is why a “mobile number city tracker” that only asks for the digits has no credible source for a live city. At best it may show the country or an old allocation region from a numbering database.
There is nothing wrong with an area-code lookup if it is described honestly. A database can map a prefix to an administrative region or historic service area. The problem begins when that result is presented as if a handset had just transmitted its coordinates.
If a page always puts a marker in the centre of a city immediately after a number is entered, ask where the live position supposedly came from. A static prefix table cannot know that the subscriber has boarded a train, crossed a border or handed the phone to somebody else.
Mobile-number portability allows subscribers in many countries to move a number between network operators. Depending on the numbering plan, prefixes that were once useful for identifying an original carrier may no longer identify the current one.
Portability does not itself move the number geographically, but it demonstrates a larger principle: allocation metadata and current network/device state are different kinds of information.
A location-enabled device can estimate its position using GPS/GNSS, Wi-Fi, cellular observations and sensors. An authorized app or lost-device service can then share that location. A carrier can also have network information unavailable to public websites. Those are actual location-data sources.
A telephone number on its own is not one of those sources.
The LocationOf phone-number information tool identifies the international calling code and broad numbering region without pretending that result is a current city. If you are trying to recover your own phone, use the lost-device recovery guide instead.
For the broader issue, read Can you track a mobile phone number’s current location?. To understand what network operators may know, see Can a mobile carrier locate a phone?.