In most European countries, like in the U.S., there was a national telephone company. These are by and large privitized in the 1980s and 1990s, subject to various rules and regulations.
In the U.K., France, and Germany, the phone operator (BT, France Telecom, and Deutsche Telekom) were kept intact, but regulated. In the 1990s, they were required to lease out access to the phone network to competitors at regulated, wholesale rates. The idea is that you can't have effective competition for the last mile anyway, so you might as well put that into a monopoly, and require it to offer access to the last mile loops to competitors. (Obviously you then have to regulate the price of that wholesale service otherwise the monopoly can easily circumvent that by pricing wholesale access sky high.)
This approach is common, and theoretically sound. Something similar is used for the electric market in the U.S. (a local, rate-regulated monopoly owns the electric wire into your house, but it is required to buy electricity from competitive, wholesale markets.) But it's hard to do correctly--if you set the regulated rates too low, you kill off any incentive to invest. If you set them too high, consumers pay too much. Nobody really did it that great--of the largest five EU countries (the UK, Germany, France, Spain, and Italy), all have slow Internet relative to the U.S. Spain and France are turning that around recently by investing a bunch of government money in building fiber.
The U.S. situation was better due to an accident of history. Unlike most of Europe, almost everyone already had two wires into their house (cable and telephone). The U.S. implemented unbundling for DSL service for a relatively short but key period (early 2000s). That set a floor--cable had to be better than DSL to compete.
That never happened in the big EU countries. If you look at the OECD statistics, the thing that really holds them back is very high DSL usage: https://data.oecd.org/broadband/fixed-broadband-subscription.... Germany, France, and the U.K. have 30 DSL subscribers per 100 people, versus just 7 for the U.S.