You're just upgrading a design.
There's an option under Interface you can uncheck so that upgrading a design won't remove the components from the design you're upgrading from: remove functional components when upgrading a ship design.
It's also possible it's unchecked by default, but I don't remember.
There is also a system in place to upgrade ships that are already built to another ship design; the only real limitation is that you can only upgrade a ship to a design of the same hull class (cargo, tiny, small, medium, large, huge). If you click on the ship you want to upgrade and click the Upgrade button, which is also accessible from Ship Details, you'll see a list of the ship designs you can upgrade that specific ship to. If you don't have any, you'll need to design some, and, in the case of your flagship that you get at the start of the game, research up to medium scale building first.
Do note that upgrading an already built ship to a new design will cost you money. It is generally close to the difference in components between the two, and then factored in as a rush buy cost ((x ^ 1.1, truncated) * 6), but I haven't looked into this enough to be certain that it is always the case. It would however seem cheaper to upgrade a ship by adding things to the original design than by changing the design completely.