The toggle only appears if you are on a WiFi (SSID) with 6E support.
If your AP/Router does not offer 6-GHz, there is no toggle.
WiFi7 for example can be offered without 6-GHz band, only using the 2,4- and 5-GHz band. In such a case, you won’t see the 6E toggle when connected to such a WiFi.