You need some tools and a chance to play with a circuit.
Here is a 400VDC to 24V isolated flyback. Not what you want but a start.
Attached is a file. Down load LTSPICE and put it on your computer. Then open my file.
You should see the schematic. Click on "run" and wait for a while. Click on the output voltage. It will take 150mS for it to start and make voltage.
This is a good place to learn how things work and what happens when changes are made.
Save the schematic to a different name before making changes so you can get back.
View attachment 134513
Red trace is the voltage on M1.
Good luck
RonSimpson