Router and Modem are actually two separate devices, if you want to buy your own modem you might need to buy a router as well.

A router (router) shares your Internet connection with multiple devices, the ideal router currently is a wireless router that hosts WI-FI network that allows for wireless communication between multiple devices, and includes multiple ports that allow you to connect more than one device directly.
The router is connected to the Internet via the modem, the router gets one year IP address on the network, Internet services communicate with your router and the router (router) connects to the appropriate devices connected to the home network.
Having a router alone does not allow you to connect to the Internet, the router must be connected to the Internet, and you need a modem to do that.

Your modem connects to your Internet service provider, either via an axial cable if connecting to the Internet via cable services, or via a DSL modem if connecting via a landline.
The modem connects to your Internet service provider, and the modems have different types that vary depending on the type of connection: cable, telephone lines, satellites, or optical fibers, and the modem has an outlet through which it can be connected to the router (router) or to a single computer device to connect to the Internet.

Internet service providers offer a modem and router in one device, this device includes electronics and software that provide all modem and roter functions together including wireless communication, and the device acts as a router to create a home network using cables or wireless communication