WHO states that “the ear is a self-cleaning organ and does not require any active cleaning” and discourages the use of cotton buds for cleaning the inner ear. Although it is generally okay to use ear buds to clean the outer parts of your ear, it is still best to consult your doctor on safer methods to clean your ears (if needed).
https://www.who.int/news-room/q-a-detail/deafness-and-hearing-loss-ear-care

