Q.what will get rid of root maggots on my broccoli
I have root maggots on my broccoli root and I don’t want them to destroy my whole garden.

Depending on the number of maggots you're seeing, and the length of time since you discovered them, you may be able to save the entire garden if you sacrifice the broccoli. But you'll probably want to take steps to stop these pests this year, so you'll be in good shape for next year. This article tells you more: https://www.gardeningknowhow.com/plant-problems/pests/root-eating-insects-identifying-vegetable-root-maggots-and-root-maggot-control.htm