How do you do it?
There really is no mystery. Ships are constructed outside the bottle in pieces, then they are reassembled inside it with long-handled tools and wires.
In the case of sailing ships the main deck, the masts and the sails are usually inserted in one piece, carefully designed to fold flat and be re-erected once past the neck.
So it is easy. Well, not really. The idea is simple but doing it involves a lot of judgment and care. If you break a mast or snap some rigging when the ship is in the bottle, then you cry. Or try to turn it into a wreck-in-a-bottle. Getting some glue on a thread that shouldn't have any might be almost as bad.
The two last examples show various stages in the process.