Try an SMC reset & PRAM reset (hold the PRAM reset for at least three chimes so it activates several times).
With your laptop powered off, reboot both the modem & router. Once both the modem & router are fully booted (give them at least five minutes to finish booting), then try Internet Recovery Mode again to see if you are now prompted for the WiFi password.
Or you can take the laptop to friend or family member's house to try a different WiFi network.
If you have access to another Mac, then you can download and create a bootable macOS USB installer.
Using a Thunderbolt to Ethernet Adapter and an Ethernet cable to connect directly to your router is the best & easiest way to solve the problem. Otherwise if none of the resets I mentioned work, then you will need to modify your router's WiFi settings at least temporarily until you are finished with Internet Recovery Mode. How and what you modify on the router varies by router manufacturer and model so you are unlikely to get any further assistance here.
Edit: Added links to SMC & PRAM resets.