That was 1 second ago
Around 300 billion mealworms are killed each year.
Mealworms are primarily for consumption, serving as an alternative protein source. Additionally they serve as pet food and animal feed.
Insects experience emotions or conciousness in different ways than humans and other animals. Despite that they have shown distress when conditions are not to their liking. This can lead to cannibalism, disease, heat deaths, malnutrition, and behavioral restrictions related to their natural cycles. It's hard to say if this distress is because of mental stress or because of subconcious actions, but distress is distress.
The farming of mealworms has less of an impact compared to other animals, simply because of their size. Despite this they still produce a considerable amount of greenhouse gases and ammonia, as well as using a large amount of water.
Various sources were used for each animal. When numbers differed the average was taken, depending on which most sources seemed to agree on. When ranges were given the lower end of the range was used.
Mealworms: https://rethinkpriorities.org/publications/insects-raised-for-food-and-feed, https://bootstrapbee.com/smallholding/is-mealworm-farming-profitable, https://www.sciencegate.app/document/10.3920/jiff2021.0029