What is the primary function of the thyroid gland in the human body?
A) To regulate blood sugar levels
B) To produce hormones that regulate metabolism and energy levels
C) To filter toxins from the blood
D) To produce enzymes that aid in digestion