Whether you choose 2.4 GHz or 5 GHz, you need to make sure your wireless is enabled on your modem/router and set to use the same frequency. Check your specific model of router for compatibility and frequency capabilities.
With a dual-band router, you can set it to transmit at both frequencies concurrently. In this case, you typically have two networks (SSIDs) that appear in your network list, with identical names except for a “5G” or “2.4G” at the end. You can then choose to connect each individual device to either network.
On most newer modems, there is also a way to find the best WiFi channel for your environment and then change the channel as needed in the modem’s wireless settings. This way you can make the most of the different capabilities of 2.4 GHz vs. 5GHz WiFi.