The IKEA led light that you took apart probably uses a capacitor for current limiting. It would have to be a 400 V capacitor and I can't see it in the pictures, but I can't see how else it would work. It could be inside the screw part of the light.
The component labeled S489A is a voltage supressor, which is really a high voltage zener diode. The 400 V capacitor lets a few mA through, limited in voltage by the "S489A" to somewhere around 40 V and the PT4115 and its associated inductor etc increases that current, while reducing the voltage, to drive the LED.
If they had just limited the current with a 400 V capacitor, the light would have taken more current and had a very poor power factor. The capacitor would have been very large. The design that they have used supplies 10 - 20 times as much current to the LED as is taken from the mains, but doesn't need expensive components.
Little flyback transformers like you are looking at on the FSQ0170RNA data sheet are extremely difficult to get right, and make for a lot more complication. I have tried and failed to wind them correctly. The problem getting the stray inductance low enough. As the current in the primary coil is interrupted, any stray inductance in the secondary will cause a voltage spike. If there is also stray inductance in the primary, that is at all linked to the auxiliary winding, there will be a big spike on the auxiliary winding. This means the auxiliary voltage rises too high and shuts down the FSQ0170RNA. You can see that transformer construction is critical from the fact that they have had to split the primary winding in two, and wind half either side of the secondary.
I hope I don't sound too condescending, but I don't expect you to understand the previous paragraph. If you don't understand it, you certainly shouldn't be thinking about making a flyback transformer. I suggest you look more carefully at the IKEA lamp which is much simpler.