Well, first, think about what story element or emotion you want to convey through the flashback. Then, decide on the style - whether it'll be in color or black and white, detailed or sketchy. And make sure it fits seamlessly into the overall comic narrative.
To write a good flashback in a comic, start by planning the key moments and details. Use visual cues like different panel borders or color tones to distinguish it. Also, don't make it too long or it might disrupt the main plot.