You can think of your router like a radio -- it sends and receives signals through airwaves. Whereas a radio picks up audio broadcasts in AM or FM airwaves, a Wi-Fi router sends and receives data through 2.4 and 5GHz airwaves (as well as 6GHz airwaves if it's a fancy Wi-Fi 6E router).  Nearly all routers include separate radios for those bands, which lets you connect to whichever band is best. Some routers will automatically steer your connection between the multiple bands available, but you can usually turn that off as well, making each band its own, separate Wi-Fi network. The 2.4GHz band offers better range than higher bands, but speeds are limited. With 5GHz (or 6GHz), you'll be able to hit much faster speeds, but those speeds will drop off at range faster than you'll see with 2.4GHz. In general, the 5GHz band is going to be your best bet for a reliable, high-speed connection at close and medium range, while the 2.4GHz band is great for devices at the far reaches of your Wi-Fi network, where the improved range is worth the speed tradeoff.