I would say for a top notch shipyard you need:
Starport = A
Population = 6+
TL = C+
Starport A is obvious. You need one capable of building ships.
Population 6+ is necessary because you have the economy and scale of society to produce all the stuff that goes into building ships. That means you aren't importing materials for the most part, if at all. This is important for two reasons:
First, it keeps costs down if most or all of the material to build a ship is procurable locally. It cuts out shipping costs and time.
Second, it means if there's a problem with any of that material, the vendor is local and you can get the problem resolved with relative ease.
Less population, and you simply don't have the economic base to have companies making all the different components that go into a ship.
Tech level needs to be high enough that they can produce a ship of what might be called current technology. You probably don't need the very top notch, cutting edge, technology for most ships, and can get away with stuff that's reasonably close to the top tier technology.