For a 2015 model, an Apple Thunderbolt to Gigabit Ethernet Adapter is the best and fastest option (the USB Ethernet adapter is much too slow) if WiFi is not working.
Here is an Apple article with instructions for creating a bootable macOS USB installer:
Create a bootable installer for macOS - Apple Support
You will need access to another compatible Qualifying Mac. For a 10.13 installer it generally requires a Mac from Late-2009 to 2018. For a macOS 12.x installer generally needs a Mac from 2015 to 2021. You can confirm compatibility of a Qualifying Mac using this article:
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility
If you successfully create a USB installer, but it won't boot, then try using another USB stick (especially a different brand). The quality of USB sticks is extremely poor, plus Macs can be very picky about the drives used for booting.
If your WiFi on this laptop is not functioning, then maybe there is a hardware issue with the laptop which may be interfering with your ability to boot a macOS installer. In my experience supporting thousands of our organizations laptops, accidental liquid damage is the most likely since I find it rare for WiFi to just fail on its own.
Maybe try running the Apple Diagnostics (requires connecting to the Internet).