If you can protect them before the damage is done then resin or wax polish will help to protect them, once the damage is done you will need something lightly abrasive or some chemical solution to clean them up followed by a resin or wax polish to protect them again.
I cleaned the damage off mine using Mer polish which has a very light abrasive in it, like a finer, less aggressive version of T-cut, and then resin polish afterwards to protect it.
I tried toothpaste (YouTube videos show this) but it didn't touch it, also heard of people using Autosol metal polish.
Best to protect them first, less hassle and less risky than trying to restore the damage later, all my previous cars had glass headlights so it wasn't an issue I was aware of till it was too late.