is there some kind of light oil or something to use to help prevent this
Welcome to the forums.
There are some light oils that some folks use in cleaning the rails. There seem to be folks pro and con to using them.
If you do a search to the right for “gleeming” you may find an alternative answer. It is a process of polishing the rails that seems to last for a long time. It takes a bit of doing, but from the comments it reduces track cleaniing to a very occasional chore.
Good luck,
From a tip I learned from a thread here a while ago is using CRC 2-26. It works well I’m happy with the results. here
I also recommend getting a track cleaning car if you have a medium to large sized layout.