You should never eat any moldy broccoli as the moldy broccoli could make you sick.
However if only a small part of the broccoli has mold on it then you can cut off the moldy part of the broccoli and then eat the rest.
Or if you have a bag of broccoli and a few of the broccoli pieces are moldy then you can remove those moldy broccoli pieces and throw them out.
Then you can eat the rest of the broccoli.
But if the broccoli has mold on it's entire part of it then throw it out because the mold on the broccoli can cause stomach issues, diarrhea, food poisoning etc.
It's not worth the risk to your health to eat moldy food.