Once you have chosen the right moments for your flashbacks and foreshadowing, you need to write them in a way that is clear and engaging for your readers. To do this, use transitions to signal the shift from the present to the past or the future, such as words, phrases, or sentences that indicate the change of time, or formatting like italics, dashes, or chapter breaks. Additionally, use sensory details, dialogue, and emotions to make your flashbacks or foreshadowing vivid and immersive. Descriptive language, sensory imagery, realistic dialogue, and emotional reactions can bring your flashbacks or foreshadowing to life. Finally, use relevance, consistency, and surprise to make your flashbacks or foreshadowing meaningful and impactful. Make sure that your flashbacks or foreshadowing are consistent with your plot, characters, and theme, and use some surprise or twist to make them intriguing and memorable. Revealing something unexpected, shocking, or ironic, or subverting your readers' expectations can help you achieve this.