whats this part

so i was recently using my Lionel No. 50 gang car and decided to open it up and this spring came out and i was wondering whats its use is