Depending on your model of wireless router, you might have the option to have the same network name broadcasted on both bands so that it appears as a single network. Under this configuration, clients will automatically choose which of the two bands to use. However (and this is a big however), many client devices aren't as intelligent as you might expect them to be and can frequently make a non-optimal choice.
The advantage of broadcasting two separate SSIDs is that you can manually choose which band to use. 2.4 GHz is slower and more prone to interference due to its limited number of non-overlapping channel options, but lower frequencies are generally better at penetrating walls. 5 GHz is faster and will likely see less interference, but may not be supported in some devices with older or low-cost WiFi chips.
Generally speaking, you should prefer 5 GHz unless you are using a device that doesn't support it or if you are in a spot where the 5 GHz signal is very weak. You can also try running a speed test on each band for each device to see which band gives you better performance on a per-device basis.
1Not all devices support 5G - For those, you use the 2G network. – confetti – 2018-08-28T01:19:59.550
@confetti - so i connect everything to the 5g network if it connects, otherwise i connect to 2g? – charlie angle – 2018-08-28T01:40:01.350
1Yes, you usually always want to prefer 5G. It's faster and more stable. For me, it also has a better range, which could be due to signal interferences though. A lot of stuff uses 2.4GHz, not just Wi-Fi. Even your microwave does. – confetti – 2018-08-28T03:23:52.637
1@confetti 5G and 2G are cellular phone technologies. You should use the correct WiFi terminology - 5GHz and 2.4GHz. (Yes, I know that most routers use 5G or 5g to denote the 5GHz network ;-) ) – robinCTS – 2018-08-28T17:55:17.640