Modems are not a requirement, at all. They just happen to be the common case in many parts of the world because they allow usage of existing (quite often old) telephony or cable television infrastructure to provide internet access.
In many of the more developed parts of the world though (except the US, because we're still essentially a third-world country when it comes to internet access outside of very large cities), it is far more common to have 'Ethernet in the first/last mile' (that is, the final link from the ISP to the client demarcation point (usually a gateway or NAT router) is Ethernet of some sort, with 'first/last mile' referring to that link specifically). In most places, this translates to a fiber-optic link to the ISP, but in dense residential buildings such as apartments, it's much more common for it to be Cat5e (or if you're lucky Cat6) UTP cabling (that is, 'regular' Ethernet cabling).
In such setups, there's no need for a modem at all, because you're not tunneling Ethernet or IP over a different type of physical link (such as X.25, ISDN, or DOCSIS). You will usually need a router though (and should have one even if you don't need it because it provides an extra layer of security).
In your particular case, either your apartment is set up like this (that is, you have a centralized link to the ISP which is then distributed through a switch to each of the apartments), or you have a single centralized modem which is handled in the same way.
As an aside, there really may be no modem here at all. While the internet, in it's infancy, did originally rely a lot on connections over analogue communications channels like phone lines, that hasn't been the case for the core of the internet for multiple decades. Modems have only hung on because ISPs are cheap bastards who don't want to invest in newer infrastructure until there's no other option (this is also why we're still stuck using IPv4 more than 20 years after IPv6 was developed). Outside of that first/last mile, you won't find modems involved in internet access in most parts of the world unless you're quite literally in the middle of nowhere. The modern internet runs on fiber Ethernet links between major data centers, and has nothing to do with analogue communications infrastructure.
The real irony here is that a lot of the traditionally analogue telecommunications industries are migrating to running on the modern fiber network infrastructure the core of the internet runs over. A lot of bigger phone companies are already using VoIP on their internal networks instead of historical analogue network protocols like X.25 and ISDN, and even many cable and satellite television services are moving the same direction.