Networking 101 course: the home network and router is a complex setup masquerading as something simple. For everything I say below, yes - there are exception and complexities beyond that.
The internet runs on IP Addresses. However, thanks to the foresight of people back when computers were expensive installations, they only allowed for a few billion using the original IP4 technology, which is slowly being updated to IP6. That’s not enough for a world full of PCs, printers, Ring doorbells, iPhones, smart TV’s, and Nest thermostats.
As a result, home network routers get a single world-wide (public) address; they act as a firewall - they create an internal network of IP addresses that don’t go out onto the internet, and anything that does, uses the one public address of the router. The router is the default gateway for outbound traffic.
So the router has a WAN port (WAN=Wide Area Network) that asks the rest of the world for its address, Then, inside the home network, on its LAN ports (Local Area Network) or Wifi, it is the master handing out the addresses (“DHCP Server”). As a consequence, the router must have a fixed address on the LAN; there are a few IP addresses that are designated for this purpose. These address ranges are reserved for home networks only. (typically 192.168.x.x or 10.x.x.x where X can be 0 to 255)
When a device is plugged into a network, except for a special few devices, it asks for an address. Process is called DHCP, the device broadcasts a request and a receives a reply “use this address”. It can use that address “lease” for a specific time - maybe 8 days - then renews it to be sure it is still on the right network. It also renews its address request if the network connection goes down. (Power out, unplugged for a moment, etc.) All the devices can talk to each other on the same LAN.
Side note - DHCP uses “broadcast” to obtain an address. The router stops broadcasts from going to the rest of the world, keeps them local to avoid flooding the internet. But… devices like printers will also use broadcasts to identify themselves; so you need to be on the same LAN as your printer (usually). Broadcasts is also how one PC finds another to share files.
Several things can go wrong:
The WAN port cannot be part of the LAN setup. Only plug that port into an outside connection to the internet. (Hence, sometimes, it is designated by a globe symbol). A computer on that port will not get an IP address.
You can plug one router into the other, using the WAN port of one into the LAN port of the other, to get cascading networks. But now you have two different LANs that may or may not have the same address range (its debatable which is worse) - so will have problems communicating between them, and cannot broadcast between them. So a PC on one LAN (wired or wifi) will not be able to broadcast to a printer on the other LAN and cannot find it. And odds are they are on different IP ranges and wouldn’t “hear” the broadcasts anyway. (And unless you powered them off-on, the devices on wi-fi never lost their connection, keep their IP addresses). They may even have the same LAN IP address range, and so the one router will get confused, since a router should not (cannot) have the same range on LAN and WAN.
Worse, you somehow connect to routers on the same LAN physical wiring. (I.e. plug LAN-to-LAN, or use the same Wifi name) Now there are possibly two address ranges, two DHCP servers, and it’s random which address range a device gets when it’s started up. And probably, one of those routers has no valid WAN connection, so devices with its IP address range and thinking it is the default gateway will send data to it, and that will never get to the internet.
Also - devices only ask for a new IP when they lose connection. If you have an “ethernet switch” to extend your LAN, and plug it from one router into the other without losing power, the devices will not realize they are on a different LAN and not ask for a new different, compatible IP address.