Bud worms are common. But you’ve got a serious rot issues from the worms. I'd bet they look like this.
View attachment 999480
The worms will migrate to the center stalk, where they’ll munch away for weeks, shitting up a storm. The shit and broken chunks of bud will become a vector for rot and mold. By the time you discover the worm your bud is toast. The only cure at this point is to cut out the rotten bud and discard. If you don’t cut out the rotten shit, you’ll lose the entire plant. Don’t try and save anything that’s damage. It all has to come out.
View attachment 999484
If you have a stem that you want to try and save (like the main stem low on the plant) spray the area with
hydrogen peroxide (to keep mold spores from flying around) and remove all the plant material around the rotten area. ALL the rotten stuff has to go in the trash! Then spray the stem with isopropyl alcohol. You may be able to hold onto the stem if you monitor it daily and keep applying the IA if you see the mold return.
To kill the worms apply any of the Bt (bacillus thuringiensis) products. The problem being that the Bt only kills the worms if they eat it and the product breaks down in sunlight after a few days. And if a worm is already inside the bud, it's not going to get em.
You should also check for the month eggs every day. They’ll look like this
View attachment 999493
It's definitely a battle you won’t win and you’ll continue to lose buds. Think the only real solution is to build a net structure (which a lot of growers have to do). You can only hope to slow them down, by daily monitoring for eggs and adults, spraying weekly, and removing any and all infected buds as soon as you find them. If you search on “bud worm” you’ll find hundreds of articles and post. (All basically saying “fucking little worms”.)