To make a resource available to your own town(s) it needs to be connected to your town(s): either simply by road (if within your borders), or roaded and Colonised by a Worker (if still outside your borders).
To trade resources to another Civ, there needs to be a continuous/ visible trade-route from the resource to your capital, and between your capital and your potential trade-partner's. For pure overland routes, that means a continuous road.
For water-trade it's a little different. Coast-tiles can be traded across once there is a Harbor at both ends (i.e. Mapmaking is known by both trade-partners), but you can only trade resources over water once you've mapped a clear route from one of your Harbour-towns (marked with an anchor), to a Harbour-town owned by that potential partner (or by a neighbour they are not currently at war with).
However, Sea-tiles can only be traded across after at least one trade-partner (you or the AI-player) has learned Astronomy, and trading over Ocean-tiles requires Navigation (optional) or Magnetism (required for era-advance). If you're still behind in tech, watch out for Wonder-building popups (or press F7) to see when Copernicus (Astro) and Magellan (Navi) have been started by an AI, to let you know when those Techs have been learned.
But you need to be careful when making resource trade-deals, especially during the early game. All deals must run for at least 20 turns, but overland trade-routes can be blocked or cut by Barbs or enemy units, and Coastal tiles can likewise be blocked by hostile ships. And if your partner loses their Harbour (or access to a foreign Harbour) while you're shipping goods to them, you will be held responsible for breaking the trade-deal.