I could be wrong, and I'm sure more knowledgeable people than myself will chime in, but for flushing it's simply keeping your regular watering schedule (assuming you're not doing hydroponics), but using plain water and when you water them letting the pots and substrate be fully saturated, waiting 15 minutes, then watering them extensively again.
You're really just trying to flush the feed and extra nutrients out of the root base so that they only suck up plain water for the final week before harvesting.
Leafly has some more info here:
https://www.leafly.com/news/growing/flush-cannabis-plants