That depends on the state of your paint. If the paint is still good it will help a bit because the coating will take some of the wear. But if the paint is already damaged then rust will have started and applying a coating on top of that won't make much difference, though it may slow things down a little bit.
The best protection against rust is to keep your car clean, especially from leaves, bird droppings and other debris. Wash but not too frequently and if there are scratches or other minor issues fix them immediately.