You can chose what ports to prioritize. If you enable output prioritization, all products from any input will be first attempted to output via the prioritized port. If that port cannot accept any more products, the other non-prioritized port will be used. Input prioritization works in a similar way.
Assigned trucks will follow this harvester which will load them with wood. Trucks will deliver the wood to the factory and return back to the harvester.