How can you stop flashbacks?

Psychotherapy. Flashbacks are your psyche's way of communicating to you that it is having difficulty integrating that specific memory in a comfortable/ sensible way. Flashbacks are very common reactions to traumatic experiences. Psychotherapy can help! most therapists have experience helping people heal from traumatic experiences. The process is safe and confidential.
Helpful workbook. In addition to working with a trauma specialist, consider the PTSD Workbook by Mary Beth Williams. This book includes a chapter, with exercises, on helping yourself when you re-experience a trauma. One basic strategy is to ground yourself in the present moment holding onto a safe object, name objects in your environment, clap your hands, stomp your feet, splash your face with cold water.