Cleaning and lubricating the chain will help it function properly and protect other transmission components (freewheels, chainrings, etc.) from additional wear.
Ebike's Cleaning and Maintaining: How To Extend The Life Of Your Chain?