That is every grower's absolute nightmare, Lilyb0974. When you spot mold like bud rot (Botrytis) or powdery mildew, you have to act immediately because it spreads incredibly fast through microscopic spores.
First and foremost, never consume any parts that have mold on them, as it is a major health hazard. What you want to do right now is carefully cut away the affected buds or sections, making sure to cut a bit into the healthy tissue below it to ensure you got it all. Be extremely gentle when doing this so you don't accidentally shake and scatter the spores onto the rest of your crop. Once the moldy parts are safely removed and discarded, you don't necessarily have to chop down the whole plant right away if the rest looks completely clean. You can let the remaining healthy parts continue to grow and mature, but you must fix your environment instantly. Turn up your ventilation, add more oscillating fans to keep the air moving, and drop your relative humidity levels significantly to stop any leftover spores from waking up and ruining the rest of your hard work. Keep a very close eye on them daily.
Happy Growing Growmie🌱