You will be unable to create a bootable macOS 10.13 USB installer using a 2021 Mac unless you already have a copy of the High Sierra installer already downloaded and stored from an older Mac. If you have access to a 2010 to 2017 Mac, then most of them will allow you to download and create a bootable macOS USB installer. Or if you have access to a 2008 - 2009 Mac, then you can create a bootable macOS 10.11 USB installer. If these are not options, then you will need to use the original OSX 10.6 Snow Leopard DVD which shipped with the iMac from the factory (the DVD will have a gray label which notes the exact model of the iMac).
You can try changing the date on the iMac using the command line. You can make sure the date is current, but if that gives you the same error, then try changing the date to some time in 2017 (and if that fails try a year earlier, etc.). Launch the Terminal app from the Utilities folder while booted to the installer.
Set the date to Jan. 16, 2022 @ 11:33AM:
date -u 0116113322
Set the date to Jan. 2, 2017 @ 11:33AM:
date -u 0102113322
Note: the last two digits is the year. Press the "Return" key at the end of each line to execute the command.
It is best to connect the Mac directly to the router using an Ethernet cable for a faster more reliable connection which bypasses hard to troubleshoot WiFi issues.