This is a very very broad question and it wouldn't surprise me if it gets closed for that reason.
However I'll take a stab at it.
So far we haven't needed a shipyard because all our spacecraft are assembled on the ground. Equivalent to an inland drydock.
If we want to send ships to mars or further, we're almost certainly going to need to assemble them in orbit from multiple sections. They'll be designed to clamp together like the ISS and be reinforced with structural supports afterwards.
It might be beneficial in such a scenario to have a "Workshop" of sorts which can support the construction crews until the ships are ready to inhabit. Realistically it'd be worth having such a facility for safety reasons too as the construction environment is particularly dangerous.
So in this scenario, the Shipyard would take the form of a single self-contained habitable module, likely a Skylab style facility, Any supplies required for the construction would be tethered to it externally, then the actual spacecraft would be constructed docked directly to it.
Practically if you're going to assemble something in orbit like this, you'll want a few things, Tele-operated arms similar to the Canadarm, most likely more than one of those. Perhaps some form of manned or unmanned "tug" for maneuvering the structural components and starship modules.
It may be worth having a cryogenic fuel pod to store fuel for the ship long-term (it'd be filled in multiple launches and then transfer to the ship when it's time to launch)
Your workshop will need facility to manufacture tools and small components, the ISS currently has a 3D printer for this but you could upgrade that capability with actual machine-tooling for more robust parts.
Practically, this early shipyard will be a small live-in workshop rather than a drydock, and it won't wrap around the ship like the ones in Star Trek, but I think it's the sort of thing you could expect in the next few decades.