they are expensive either way, if you're buying them to feed directly to your flock; they are only cheap if you spend the initial few pounds/dollars to buy a couple of hundred live, and then grow them on and let them go forth and multiply for next to nothing.
Cost is not the only issue. The...
you might find this site useful
https://mealwormcare.org/breeding/
I have been doing it for some years now, without issue. I recommend it, but it only suits those who don't mind handling 'creepy crawlies'.