Short answer: Bring the driver on a USB stick. Ideally export it before the reinstall with pnputil /export-driver * D:\Drivers; otherwise note the adapter's hardware ID and download the LAN or Wi-Fi driver from your PC maker's page on another PC. Install it with pnputil /add-driver "E:\Drivers\*.inf" /subdirs /install, or get online first with a phone's USB tethering.
Why the network disappears after a reinstall
Windows includes many network drivers, but not all. Newer Wi-Fi chips, some laptop Ethernet controllers and older adapters often need a driver the install media does not have. Until it is installed, Network & internet shows no Wi-Fi or Ethernet.
Prepare before you wipe the PC
Best case, export your current network driver first:
pnputil /export-driver * D:\Drivers (Windows 10 1607 or newer, administrator Command Prompt), then keep D:\Drivers on a USB stick.
Rain Driver's Rescue Bundle does this and adds a restore script that installs network drivers first.
Identify the adapter while offline
In Device Manager look under Network adapters and Other devices. If the adapter is unknown, open Properties → Details → Hardware Ids and note the PCI\VEN_xxxx&DEV_xxxx line. On another PC, search your PC maker's support page for your exact model, or the chip maker's page using that vendor ID. Download the network (LAN / Wi-Fi) driver to a USB stick.
Install the saved driver with PnPUtil
Plug the stick into the new install, open an administrator Command Prompt and run:
pnputil /add-driver E:\Drivers\*.inf /subdirs /install
Replace E: with the stick's letter. If the driver came as a .exe installer, run it instead. A phone with USB tethering also works as a temporary network on most PCs.
Get online first, then finish the rest
Once the network works, run Windows Update and install the remaining drivers from the PC maker's page. Then check Device Manager once more for yellow warnings.
Rain Driver does the export, checksum and restore steps for you — but every step above works without it.