I am trying to make my raspberry pi emulate a usb ethernet gadget that when attached to a pc you can access some storage through its network. I was thinking that u might be able to make a samba file share or maybe an FTP server.
The Raspberry Pi Zero does not have a wired port to connect it direct to your network, so you always have to use an additional device with an USB port and a wired network port. As you noted you will connect the Pi Zero with an USB cable to the additional device and use OTG ethernet gadget mode to emulate an ethernet connection. On the other side you connect the additional device to your local network with its wired port or maybe by WiFi and route the network traffic to the samba share or FTP server on the RPi Zero. The additional device is just a router.
But at least now you should see that it does not make sense. You can simply have your samba share and FTP server on the additional device.
I actually figured it out. What i did was used this GitHub project: https://github.com/RoganDawes/P4wnP1_aloa which let me easily change the USB gadget that i wanted to emulate. I than literally just set up samba. Also if i wasn't clear what i had wanted to do was be able to use the raspberry pi as a USB storage device but instead of just it emulating a USB storage drive it would pretend to be a USB Ethernet adapter with a file share that you could access from the attached PC.