You need to move ships with Space Yard components on them in the same sector (square) as the star. Then, you need to build a bunch of Starbases. Each Starbase must have 1 of a certain component on them. To build a Ringoworld, you need the following number of components:
1 Ring World Placement Generator
5 Planetary Gravity Plating
5 Hyper - Density Cables
Since all of these components are 2000 kT, you will need to put them all on different Starbases.
For a Sphereworld, you need:
1 Shpereworld Placement Generator
10 Planetary Gravity Plating
10 Hyper - Density Cables
It is more effecient to build 11 (or 21 for a SW) Base Spaceyards in the sector with the star, so that you can have them all coordinated to build the necessary Starbases and have them done on the same turn. The components cost a huge amount of resources, and don't do anything by themselves, so having the Plating and Cables sitting around waiting for the Generator (which costs a lot more) to be built wastes a lot of resources in maintenance.
Once the necessary components are available, select the Starbase with the Generator on it and then hit the Stellar Manipulation button (b hotkey) and build the RW or SW.
If you built the BSYs, then you now have a massive planet with 11 or 21 BSYs over it to start building defenses already.
