USB ports whether they’re the larger flat type A connectors or the small type c connectors are basically peripheral connection ports. They allow to connect various accessories and peripherals to a computer. There’s a communication protocol that allows computers to recognize what kind of devices that was connected and setup the appropriate driver for it in a plug and play manner. Anything from an external sound card to a storage device to a network adapter to a webcam.
Regarding network ports, back in the day network cards were an add on pci card that enabled network communication between the computer and the LAN. The PCI slots can be used for any number of different addon cards. These days, for desktop PCs motherboard manufacturers integrate these on nearly every motherboard. Same with sound cards, so you don’t have to buy them and install them separately. For laptops, with the prevalence of high speed WiFi and seeing slimmer form factors, physical network ports are being seen less often. So that’s where the USB network adapter comes into play for MacBooks and such when they need a physical network interface.