Blurry as it is the device on the right hand side (probably a switch, less likely to be a router) seems to have ports numbered 1,2 and 3. They would likely function equivalently. I don't recall seeing devices that must use a particular port for a modem, but they may exist
Sometimes routers have a port that is physically the same shape but is marked up in some way that draws the distinction as to how it is wired internally, such as "wan"or "uplink" - in a situation where the router is logically downstream of another network device. The router manages its own small network and lets devices on it communicate directly with each other, and it can forward traffic it knows is destined for the upstream network to allow computers inside its network communicate up.
Typically special provisions have to be made for upstream computers to communicate down into the downstream network; this is the pivotal difference between using the wan port and plugging into any other port - if you plug into another port you're connecting to the regular switch within the box and your devices in the other non-wan ports join the network at the same level rather than being downstream of the other box
The small nuisance in this is you may then have two devices on the same level in a network that both think they're responsible for providing services like routing and doling out IP addresses, and whether they play nice with each other is down to how they're programmed
This is often the potential pitfall of reusing an ISP supplied "all in one" box that has a modem, router and switch, and trying to use just the switch part of it - the router may be hard coded to treat the modem as the upstream and not offer an option for deactivating the services that serve the local network, because it has been created to solve a common problem in a particular way and not to be a flexible network device