You need to connect a device to the modem first.
Normally the easiest way is to use a LAN CABLE from a laptop/desktop computer to the modems LAN port. This will allow you to change modem settings.
Its the only way to do so if u cannot connect to the wifi.
A factory reset on the modem will default the wifi network credentials to whats written on the bottom of the modem.