Lot of people tend to use modem and router interchangeably because they don’t know the difference, or they have always used the ISP provided Gateway, where it’s an all in one solution, and everything is literally the same physical box.
This is a discussion of the Modem function itself.
A Modem gets it’s name, like lots of technology by simply shortening it’s function and slamming them together, grammar be damned. It’s the device that modulates and demodulates a signal from some transmission scheme dictated by your ISP’s infrastructure and choices.

For example, and probably most commonly in most of North America, cable ISP’s use cable modems built on the DOCSIS protocol. This protocol gets regularly revised and new hardware created to meet the new specifications, but the Modem’s job in your network is to take normal TCP/IP traffic from the router and “translate” it into DOCSIS so it can go over the coaxial network the ISP is running. Then they translate it back out to TCP/IP and send it on to the internet via various fiber interconnects. Then all this in reverse back to you as well.
The Modem is the device that handles this for your network. It may be it’s own device as shown above, or just a chip on the same board as the router.
That’s as far as we need to take it for you to be an informed consumer on the matter of Modems.