For iOS: under Setting > Cellular > Cellular Data Options > Under Voice & Data > Select 5G if you would like to turn on 5G. To turn off 5G, select 4G.
For Android: under Setting > Connections > Mobile Network > Network Mode > Select 5G/4G/3G/2G to turn on 5G. To turn off 5G, select 4G/3G/2G.