Toothpaste does actually work.
Are your headlights glass or plastic?
If plastic, there isn't anything you can really do. If glass you can get a kit to restore them. Meguairs make one that you can get at any supercheap.
This kit will work on plastic as well. But the yellow is caused by the sun damaging the plastic. So they will look good for a few months and then will require treatment again.