Exposure to loud noise is a risk factor for hearing loss. That's why it's great to see smart devices like the iPhone and AirPods notify you when the environmental sounds around you surpass a safe threshold. Also, wearing earphones like the AirPods when going to concerts can help reduce exposure to loud sounds.
We can't prevent all the loud noises around us to reduce the risk of hearing loss after exposure. Thankfully, there might be a novel treatment for avoiding hearing loss or reducing its effects in the form of a pill you swallow.