system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How hormones are turned into pills

How are hormones such as melatonin harvested and put into pills?
gpt
It depends on the hormone. Each hormone is a completely different chemical and there are different ways of making them. Some hormones are extracted from other animals or plants. For example the meat industry have a lot of byproducts that is used for tons of different things including hormones. But plants may also be full of chemicals we want to extract. Another option is to find the protein that generates the hormone in humans and then encode the DNA that makes that protein into bacteria which then allows you to have a bacteria that will produce a lot of the protein you want. Another option is to make the hormone completely synthetically using techniques from organic chemistry. By mixing certain basic chemicals in a certain way using the right temperatures and ratios we are able to make almost any organic molecule we want.

Melatonin used to be extracted from cows however due to cost and contamination production have now switched to synthetic production instead. Famously insulin costs dropped to almost nothing over night when scientists were able to splice human genome into bacteria and start mass production using these bacteria.