Winding a custom transformer with coil former
You wind it at your convenience and it makes no sense to try and do that with the core in place. In addition, you use the commonly available yellow polyester tape to properly and reliably insulate the primary from the secondary. Any doubts on the secondary wires exiting the former possibly crossing too close to the primary and you run some insulation sheath up the wires close to where they solder to the pins.

Should you in fact be using triple insulated wire for the secondary then you won’t need the sheath. If this is your first design I’d definitely advise you to google the construction details and if in doubt raise a new question about the construction.