It depends. In the original Star Trek and TNG, Roddenberry stressed that interstellar travel should never be portrayed as a quick, casual commute; after all, a trek, by definition, is an arduous, challenging journey. So travel between star systems was generally presumed to take days or weeks, although there were occasional exceptions. Star Wars, by contrast, pretty much always portrayed interstellar journeys as quick hops, a matter of hours or days. In the prequels and after, even getting from Coruscant near the galactic core to Tatooine on the fringes was portrayed as a relatively quick jump.
However, modern Trek productions from the Kelvin movies onward have tended to use a more Star Wars-ish model, with interstellar travel usually taking a matter of hours or minutes.
I don't think it's wormholes per se. It's hyperspace, a higher-dimensional space allowing faster journeys, but there seem to be certain established routes and entry points that are more viable than others. A wormhole is like a bridge over a river; I think SW hyperspace is more like an ocean that has certain favorable currents and sea lanes, or a mountainous region that has some easily traversed passes amid more difficult terrain.