It is unlikely that you have damaged your ears by flying! What you are describing is a phenomenon known as eustachian tube dysfunction. The eustachian tubes are small channels that run between the middle ear and the throat and they help equalize the pressure behind the ear drum when the pressure in the air changes. When the tubes are temporarily closed by the pressure change and then pop open, rapidly equalizing the pressure, this gives rise to the "ear popping" sensation that all air travelers know.
Sometimes, some liquid remains behind in the ear drum even after the pressure equalizes. This is called a middle ear effusion and it is an unfortunate side effect of flying and cabin pressure changes for certain people who are predisposed to it. It can sometimes take even days for this liquid to finally go away, so the fact that you noticed a decrease in hearing is consistent with that. Not to worry
though - the liquid will eventually go away and no permanent harm has been done to your hearing.
If this is a recurrent problems for you, you should talk to your primary care doctor
. There are some medications that you could take to potentially minimize these symptoms while flying.