The classic option of all life is to have a drop-down or variants that allow the user to enter in one of these urls from a higher section. This is usually done this way because of the ease involved in programming it, because it does not negatively affect the users navigation and because for a long time, it was the only way to do it.
Another slightly more current option consists of programming, using php or javacript (there are other languages ??that allow it) the auto detection of the location from which the user connects and generate the content accordingly. Some sites choose to redirect to an url according to the users geolocation, but this is not the best practice, it is preferable to generate the content dynamically, for example, if a user from Barcelona enters our domain while searching for web design, we will try to have a url called design-web-barcelona and that generates a content according to this location, perhaps showing the Barcelona offices or references to projects carried out in the city.
Many times this type of content is generated by the demands of online positioning and in many cases it is accurate if said website has genuine web content to display for different geolocations, although many places generate automatic content that is practically filler and this can hinder the users experience, because he usually realizes when reading something that this does not mean anything and distracts him from the goal of every web page, which is to make a conversion. on, whatever it may be, according to the business model.
The type of web that can benefit from geolocation are usually search engines for hotels, residences or tourist destinations, for which it is always important to know where the user is looking for and thus save some steps in the purchase process and facilitate the process and conversion.