A laptop's Wi-Fi card is one of the most power-hungry components when it is actively transmitting. To save battery, every laptop has aggressive power-management built into the wireless driver — the OS will quietly turn the card off when it thinks you are idle, and back on when you start using the network. If the on/off cycle is too aggressive, you get constant dropouts that look like a router problem but are entirely a setting on your computer.
The second common cause is interference. Modern homes are crowded with wireless signals — neighbours' routers, smart bulbs, video doorbells, baby monitors. If your router is on a busy channel, every other transmission collides with yours and the connection becomes unstable. Switching channels or using the 5 GHz band (less crowded than 2.4 GHz) makes a dramatic difference.
The third common cause is an outdated or corrupted Wi-Fi driver. Driver updates for wireless chips are released frequently to fix exactly this kind of stability issue, so a fresh install from your laptop manufacturer often resolves problems that have been bothering you for months.
If the symptom is not just instability but a connection that has gone completely dark, our companion overview on restoring a network device that shows as offline walks through the recovery steps in plain language.