If there is liquid in the ear then you may not clean it with a Q-tip, unless you do it very lightly. If it is just wax, it is permitted.
Explanation:
There are two things to consider when discussing this question. One is that the cotton tip changes color. And two is there an issue with squeezing out liquid out of the tip of the swab.
First, we will discuss whether there is any issue with changing the color.
The Shibolei Haleket quotes the Yeraim that is good for any Jew who eats berries or other fruits which stain the hands he should be careful not touch his clothing or a napkin since it is a Toldah of “Dyeing” So too one id bleeding one sold not wipe it with a cloth.
So ruled the Shulchan Aruch (OH 320:20) that one needs to be careful not to touch clothing or a napkin if his hands ore dirty from fruits. And He also rule that one shod not put a cloth on bleeding wound.
The Radbaz though ruled there is no problem in these two cases since that is dirtying not dyeing . R’ Akiva Eiger quotes Chacham Tzvi who says the same thing.
According to the Shulchan Aruch is forbidden even dirtying. The Mishna Berura though says you may as well may follow the lenient opinion if there is no other choice but it is still better to not to.
The is a difference between the cases of wiping you hands on clothing and wiping up blood. In these cases, it is not dirt per se but something which stains. However, earwax is dirt not something who dyes it everyone would agree it is just dirtying it. Furthermore, if it is something gross it is used for dyeing.
There is one other way to permit it. The cotton swab is disposable.
The Shemirat Shabbat (14:21) when discussing wiping one’s mouth from berry juice use a paper napkin since you throw it out after you use it is permitted in any case. So, rules R’C.Scheinberg he is permitted to to put toilet paper on a wound to soak up the blood and then throw away the tissue.
From here we see there are three reasons to permit cleaning our ears. 1.We are dirtying not dyeing. 2. It is disposable 3. The is no actual stain just earwax.
Is there a problem of squeezing?
The Mishna in Shabbat 143a writes: A sponge if it has a leather handle you may wipe with it but if not, you may not. Rashi explains if the sponge has a handle you may wipe the table with it but if not no since you squeeze I when you hold in your fingers.
The Rishonim disagree why I is permitted to clean with a sponge.
The Rambam (Shabbat 22:15) writes he is not squeezing. The Raavad though argues if it has a handle even if you squeeze the sponge, when you are wiping and water came out it is not called squeezing and permitted. It’s not similar to cloth which his forbidden to squeeze out water rather it’s like a bowl full of water which you pour it out, which is permitted.
The Chazon Ish explains the Raavad means that if the sponge has handle, it is clearly made to absorb liquids and then squeeze that liquid d out the fore the absorbed water doesn’t become part of the sponge and squeezing it out is not considered Dash.
The Shulchan Aruch (320:17) ruled it is forbidden to wipe with a sponge unless there is an handle because you might come to squeeze it. The Gra and the Magen Avraham both change the words “You may come to squeeze it” to “because of squeezing”. Meaning there is a Psik Reisha here for squeezing, that you will definitely squeeze out water if you touch the sponge.
Therefore, if a person has liquid in his hear then he might be allowed to use a cotton swab sine it has stick. The Shemirat Shabbat writes by putting medicine on a wound,” taking a cotton or napkin with a tweezer and dip it in iodine without touching it is forbidden sine when you put it on you will squeeze out from the cotton.
The footnote writes, “I heard from R’ Shlomo Zalman Auerbach and it is not comparable to sponge with a handle. The reason there it is permitted is because you may clean and wipe with it without squeezing water, here he is squeezing gout the medicine. Even according to the Raavad they permitted a sponge with a permanent handle then it is like a bowl.
It seems that by the cotton swab, according to the Raavad is definitely permitted since the is set handle (stick). According to the Rambam though since you need to push a little to clean the ear it might squeeze out liquid.