Earwax is made by

the ceruminous glands in the ear canal. These glands produce a sticky substance called cerumen, which combines with dead skin cells and hair to create earwax. Earwax helps to protect the ear canal by trapping dust, dirt, and other particles, as well as providing lubrication and preventing infections.