You have some sort of networking issue. It may be with your WiFi, or local network in general, or perhaps an issue with your ISP or local Internet. Try power cycling the router and waiting at least five minutes for the router to finish booting before attempting Internet Recovery Mode again. Usually it is best to connect the computer directly to the router using an Ethernet cable and a USB-C to Gigabit Ethernet Adapter for a faster more reliable connection which bypasses any hard to troubleshoot WiFi issues.
You can try Internet Recovery Mode at another location to see if conditions are any better for it.
If you have access to another qualifying Mac, then you can create a bootable macOS USB installer using the instructions in this Apple article:
How to create a bootable installer for macOS - Apple Support
A qualifying Mac means the Mac being used to download the macOS installer needs to be capable of running that same OS although the Mac does not need to be currently using that OS. For example, to create a bootable macOS 10.13 USB installer you can use most Macs from 2010 to 2018 to download the 10.13 installer. To download macOS 12.x generally requires a Mac from 2015-2022. Here is an article showing the which versions of macOS are compatible with various Apple hardware:
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility