Thank you for your asking. Kindly provide the information below so that we could better assist you.
1. Model Name: Settings>System>About phone
Refer to the link below to check the model name by model no. in the link
While using 5 GHz requires both devices support 5GHz, and showing SSID that could be detected.
2. Router Model
Please provide the model link. Furthermore, since 2.4 GHz/5 GHz also depends on the distance, does 5GHz of your wifi could be detect and connect with other phones at the same place?